-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Resource addresses in prior state of a json plan lacking indexes #24110
Comments
A note for future @mildwonkey :
|
Resource addresses in state output were not including index for instances created with for_each or count, while the index was appearing in the plan output. This PR fixes that inconsistency, adds tests, and updates the existing tests. Fixes #24110
* command/jsonstate: fix inconsistency with resource address Resource addresses in state output were not including index for instances created with for_each or count, while the index was appearing in the plan output. This PR fixes that inconsistency, adds tests, and updates the existing tests. Fixes #24110 * add tests showing expected prior state resource addressing * added example of show json state output with modules
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. |
…#24256) * command/jsonstate: fix inconsistency with resource address Resource addresses in state output were not including index for instances created with for_each or count, while the index was appearing in the plan output. This PR fixes that inconsistency, adds tests, and updates the existing tests. Fixes hashicorp#24110 * add tests showing expected prior state resource addressing * added example of show json state output with modules
Terraform Version
Terraform Configuration Files
Expected Behavior
I expect there to be symmetry between prior state and proposed state. The proposed state looks like
Actual Behavior
The prior state, if I delete the resources, looks like
Steps to Reproduce
terraform init
terraform apply
tf plan -out terraform.tfplan; tf show -json terraform.tfplan
Note that the resource addresses in the prior state do not contain an index.
The text was updated successfully, but these errors were encountered: