mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
1ae47ae314
The state refactoring command "terraform state mv" in Terraform 0.11 does not update existing dependency addresses recorded in the state when it moves objects around, and Terraform only updates the dependency addresses in the state when it performs a full update on a resource instance, and so it's a common problem for folks updating from Terraform 0.11 with resource names that are not valid identifiers to run into state upgrade errors even though they have followed the instructions produced by "terraform 0.12checklist". Dependencies are synced from config during every refresh walk anyway, so in practice we can get away with just discarding invalid dependency addresses and letting the refresh walk update them. In practice these addresses are unlikely to be pointing at a resource that actually exists anyway, because if so Terraform 0.12's configuration parser wouldn't be able to interpret it. Discarding invalid dependency addresses allows the state upgrade to complete successfully in such cases and thus gives the refresh step an opportunity to repair the problem.
42 lines
1.2 KiB
JSON
42 lines
1.2 KiB
JSON
{
|
|
"version": 3,
|
|
"terraform_version": "0.7.13",
|
|
"serial": 0,
|
|
"lineage": "f2968801-fa14-41ab-a044-224f3a4adf04",
|
|
"modules": [
|
|
{
|
|
"path": [
|
|
"root"
|
|
],
|
|
"outputs": {
|
|
"numbers": {
|
|
"sensitive": false,
|
|
"type": "string",
|
|
"value": "0,1"
|
|
}
|
|
},
|
|
"resources": {
|
|
"null_resource.bar": {
|
|
"type": "null_resource",
|
|
"depends_on": [
|
|
"null_resource.valid",
|
|
"null_resource.1invalid"
|
|
],
|
|
"primary": {
|
|
"id": "5388490630832483079",
|
|
"attributes": {
|
|
"id": "5388490630832483079",
|
|
"triggers.%": "1",
|
|
"triggers.whaaat": "0,1"
|
|
},
|
|
"meta": {},
|
|
"tainted": false
|
|
},
|
|
"deposed": [],
|
|
"provider": ""
|
|
}
|
|
},
|
|
"depends_on": []
|
|
}
|
|
]
|
|
} |