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
aws_ecs_service.launch_type can be optional #12566
Comments
Also it would be good if it was possible to pass a default value in launch_type. I have following issue: Eg:
Terragrunt usage:
|
Do you have any update on this? We have more than 50 services in one cluster with the default_capacity_provider set to FARGATE_SPOT and it would be nice to use default cluster value instead of specifying it for every service. |
I see it's already fixed. Or I'm looking at the wrong place? UPDATE: Ok, I got it. It's optional but default value is EC2. But it should be 'not set'. |
There's another problem. Setting launch type to null causes a validation error |
With the introduction of capacity providers, launch_type is not required and can be omitted.
See AWS Docs here:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_definition_parameters.html
Primarily, here is the blurb:
The issue is with the last point. If both launch_type and capacity_provider_strategy is not specified in Terraform, then terraform defaults the launch_type to "EC2". This then causes the capacity provider strategy not to be used or defaulted to the cluster strategy.
So the fix should just be to make the launch_type optional per the AWS service parameter definition and should NOT default to "EC2" when not specified, but rather just omitted when not specified.
Community Note
Terraform Version
Terraform v0.12.20
Affected Resource(s)
The text was updated successfully, but these errors were encountered: