Closed mattthaber closed 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
the root cause of this seems to be calling aws ecs create-cluster
multiple times with same parameters doesnt error, after the initial creation , it just returns the cluster instead of erroring
aws ecs create-cluster --cluster-name test-cluster
aws ecs create-cluster --cluster-name test-cluster
Hey @mattthaber 👋 Thank you for taking the time to raise this! I noticed you're using a fairly old version of the provider. While this issue awaits prioritization, it may be worth testing with a more recent version to see if the behavior has already been fixed.
[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.
Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.
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.
Terraform Core Version
1.9.3
AWS Provider Version
4.51.0
Affected Resource(s)
aws_ecs_cluster
Expected Behavior
Actual Behavior
import{}
block would work.whats weird , the
aws cli
returns 200 and shows in the response0 active services
but then in the subsequent ecsDescribeCluster picks up the existing services that have already been deployed.I can only assume the root problem here is the underlying aws api, but it is really bad IMO that you can accidently import an existing aws resource without using an
import{}
block. This can lead to incredibly bad scenerios where two workspaces are unknowingly managing the same resource and can cause major drift changesRelevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
here you can see me switching workspaces and creating the same resource. both resources claim they created the EXACT SAME arn for ecs-cluster, which seems... wrong because the 2nd workspace apply did not create it
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None