You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the aws_cloudformation_stack resource to provision an aws Elastic Container Service cluster and one or more services in that cluster. I used terraform graph -type=plan-destroy to verify that I successfully set up a dependency relationship in terraform between the TF resource for creating the service and the TF resource for creating the ECS cluster.
According to graphviz, the service is a child node of the ecs cluster node. Given that, I am expecting TF to delete the service and then delete the cluster. However, this seems to happen out of order, which causes the delete of the ECS cluster to fail since you can't delete a cluster that has services in it.
Terraform Version
Terraform v0.11.8
Expected Behavior
Terraform successfully delete aws ECS cluster and its associated services.
Actual Behavior
Terraform successfully deleted the service in the ECS cluster but failed to delete the ECS cluster itself with the following error:
* aws_cloudformation_stack.ecs-cluster: DELETE_FAILED: ["The following resource(s) failed to delete: [ECSCluster]. " "The Cluster cannot be deleted while Services are active. (Service: AmazonECS; Status Code: 400; Error Code: ClusterContainsServicesException; Request ID: 7bcbeae4-70ab-11e8-bd0b-3d3254c7f7d3)"]
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform plan
terraform apply
The text was updated successfully, but these errors were encountered:
jaloren
changed the title
terraform attempts to destroy ECS cluster before Deleting ECS Service
terraform attempts to destroy AWS ECS cluster before Deleting ECS Service
Jun 15, 2018
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 3, 2020
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using the aws_cloudformation_stack resource to provision an aws Elastic Container Service cluster and one or more services in that cluster. I used terraform graph -type=plan-destroy to verify that I successfully set up a dependency relationship in terraform between the TF resource for creating the service and the TF resource for creating the ECS cluster.
According to graphviz, the service is a child node of the ecs cluster node. Given that, I am expecting TF to delete the service and then delete the cluster. However, this seems to happen out of order, which causes the delete of the ECS cluster to fail since you can't delete a cluster that has services in it.
Terraform Version
Expected Behavior
Terraform successfully delete aws ECS cluster and its associated services.
Actual Behavior
Terraform successfully deleted the service in the ECS cluster but failed to delete the ECS cluster itself with the following error:
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform plan
terraform apply
The text was updated successfully, but these errors were encountered: