aws_ecs_cluster
: Deprecate capacity_providers
and default_capacity_provider_strategy
#22754
Labels
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
service/ecs
Issues and PRs that pertain to the ecs service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.4
provider registry.terraform.io/hashicorp/aws v3.73.0
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Expected Behavior
Clusters with capacity providers can be created and destroyed without error.
Actual Behavior
Error from cluster not being empty.
As described by @brikis98, the design of capacity providers is broken as it creates an invalid dependency chain:
aws_ecs_cluster
->aws_ecs_capacity_provider
->aws_autoscaling_group
(->aws_ecs_cluster
). This chain isn't valid, because on destroy, Terraform will try to deleteaws_ecs_cluster
first, but it can't, because theaws_autoscaling_group
(has instances in the cluster and) hasn't been deleted.Using the
aws_ecs_cluster
argumentscapacity_providers
anddefault_capacity_provider_strategy
leads to this problem and is the flawed design. As a result, we need a new association resource (see #22672) and to deprecate these arguments (this issue).References
The text was updated successfully, but these errors were encountered: