-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Resource addresses in prior state of a json plan lacking indexes #24110
Copy link
Copy link
Closed
Description
Terraform Version
0.12.20
Terraform Configuration Files
resource "null_resource" "cluster" {
count = 3
}Expected Behavior
I expect there to be symmetry between prior state and proposed state. The proposed state looks like
{
"format_version": "0.1",
"terraform_version": "0.12.20",
"planned_values": {
"root_module": {
"resources": [
{
"address": "null_resource.cluster[0]",
"mode": "managed",
"type": "null_resource",
"name": "cluster",
"index": 0,
"provider_name": "null",
"schema_version": 0,
"values": {
"triggers": null
}
},
...Actual Behavior
The prior state, if I delete the resources, looks like
"prior_state": {
"format_version": "0.1",
"terraform_version": "0.12.20",
"values": {
"root_module": {
"resources": [
{
"address": "null_resource.cluster",
"mode": "managed",
"type": "null_resource",
"name": "cluster",
"index": 0,
"provider_name": "null",
"schema_version": 0,
"values": {
"id": "7039102915404397285",
"triggers": null
}
},
...Steps to Reproduce
- Use example input
terraform initterraform apply- delete resource
tf plan -out terraform.tfplan; tf show -json terraform.tfplan
Note that the resource addresses in the prior state do not contain an index.
Reactions are currently unavailable