-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Generating resources from a map then adding a new resource modifies unexpected resources #16210
Comments
Hi @gertjanmaas, As @vladimirf7 mentioned, this is indeed a known issue and one that we have a plan to resolve but need to complete other work first to create the foundation for it. The long-term plan is to have a new meta-attribute We are currently in the initial phase of a sequence of changes we need to make to be able to eventually support In the mean time, I would suggest making your |
Since #14275 is describing the same limitation, I'm going to close this just to consolidate the discussion over there. Thanks for pointing out this limitation! |
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. |
Hi there,
I'm trying to generate a bunch of resources based upon a map. In this example I want to use the key of the map to name a resource, then supplying some data in the value part of the map. For this example (which is the simplest I could come up with) I'm creating some docker containers, but I also ran into this issue creating AWS EC2 instances and AWS ECR repositories.
Not sure if I'm using the map for a way it is not intended to be used or this is a bug.
Terraform Version
0.10.2
Terraform Configuration Files
Steps to Reproduce
terraform init
terraform apply
test-a-error = "test-data-3"
terraform plan
Expected Behavior
I expected one resource to be created and the other to be left intact.
Actual Behavior
It seems the resources are linked to the order they are in the list (outputted from the
keys()
function). If instead you add a key in thecontainers
map that alphabetically is in the end (keys()
sorts by alphabet), everything works as expected.References
Only reference I could find was #15678
The text was updated successfully, but these errors were encountered: