tflint-ruleset-aws
tflint-ruleset-aws copied to clipboard
ECS services: Cannot specify a launch_type and a capacity_provider_strategy
It would be nice if the ruleset would check that an ECS service is not specifying both a launch_type
and a capacity_provider_strategy
because evidently this isn't allowed even if the launch type is set to EC2:
InvalidParameterException: Specifying both a launch type and capacity provider strategy is not supported. Remove one and try again.
GOOD:
resource "aws_ecs_service" "this" {
launch_type = "EC2"
# snip
}
resource "aws_ecs_service" "this" {
# snip
capacity_provider_strategy {
capacity_provider = var.ecs_capacity_provider_name
weight = "10"
}
}
BAD:
resource "aws_ecs_service" "this" {
launch_type = "EC2"
# snip
capacity_provider_strategy {
capacity_provider = var.ecs_capacity_provider_name
weight = "10"
}
}