-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
| throw new Error('Ephemeral storage size must be between 21GiB and 200GiB'); |
The check here validates the values, however when using a CfnParameter's ValueAsNumber, you get a value such as:
-1.8881545897087957E+289
This value is, of course, a token. However, because of this local parameter validation, and it not exempting these token values from the check, you simply cannot use a CfnParameter for this field. If the check was done on the AWS side it would be fine, as it would know the real value by that point.
Reproduction Steps
Make a fargate task definition and try to pass in a CfnParameter's ValueAsNumber as the EphemeralStorageGiB, it will throw no matter what default/value it has because it validates the token as if it's the real value.
What did you expect to happen?
No exception, but rather a failure at deploy time IFF the value is out of the valid range.
What actually happened?
An exception was thrown preventing me from even generating the template in the first place, despite no real value being present to even fail the validation.
Environment
- CDK CLI Version : 1.116.0 (build d04661d)
- Framework Version: .NET Core 3.1
- Node.js Version: v14.17.6
- OS : Windows 10
- Language (Version): C#
This is 🐛 Bug Report