Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fargate task CPU/memory validation doesn't work with strings for example "4 vCPU" #3514

Closed
Slooz opened this issue Jul 17, 2024 · 4 comments
Closed

Comments

@Slooz
Copy link

Slooz commented Jul 17, 2024

CloudFormation Lint Version

1.7.0

What operating system are you using?

Mac

Describe the bug

E3048 '4 vCPU' is not one of ['256', '512', '1024', '2048', '4096', '8192', '16384']

See:

The number of CPU units used by the task. It can be expressed as an integer using CPU units (for example, 1024) or as a string using vCPUs (for example, 1 vCPU or 1 vcpu) in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html#ECS-RegisterTaskDefinition-request-cpu

Caused by: #3464 @kddejong

Expected behavior

4 vCPU is valid

Reproduction template

^

@kddejong
Copy link
Contributor

I'll have a PR very shortly. Just testing a few things out to make sure I have it.

@Slooz
Copy link
Author

Slooz commented Jul 17, 2024

Sounds great. Thanks for the prompt response and for your work.

@kddejong
Copy link
Contributor

A lot of variations to whats in the documentation....

.25 vCpU as many spaces as you need and vcpu is case insensitive. I've updated the schema to handle this.
Same applies to memory
1GB works along with 1 gb

Switching to a pattern style validation for this validation.

@kddejong
Copy link
Contributor

This should be available in v1.8.0 @Slooz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants