terraform/states/statefile/testdata/roundtrip
Martin Atkins 1ae47ae314 states/statefile: tolerate and ignore invalid depends_on in version 3
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.
2019-11-21 09:18:49 -08:00
..
v1-simple.in.tfstate statefile: New package for loading and saving state files 2018-10-16 18:49:20 -07:00
v1-simple.out.tfstate Fix copy-paste errors in test data 2019-08-21 11:45:06 +01:00
v3-bigint.in.tfstate states/statefile: decode backend hash as uint64 2019-05-28 23:59:36 +09:00
v3-bigint.out.tfstate Fix copy-paste errors in test data 2019-08-21 11:45:06 +01:00
v3-grabbag.in.tfstate states: object Private data is []byte, not cty.Value 2018-10-16 19:11:09 -07:00
v3-grabbag.out.tfstate Fix copy-paste errors in test data 2019-08-21 11:45:06 +01:00
v3-invalid-depends.in.tfstate states/statefile: tolerate and ignore invalid depends_on in version 3 2019-11-21 09:18:49 -08:00
v3-invalid-depends.out.tfstate states/statefile: tolerate and ignore invalid depends_on in version 3 2019-11-21 09:18:49 -08:00
v3-simple.in.tfstate states/statefile: upgrade legacy dependency syntax (#21159) 2019-04-30 14:34:01 -04:00
v3-simple.out.tfstate Fix copy-paste errors in test data 2019-08-21 11:45:06 +01:00
v4-foreach.in.tfstate read+write the new dependencies in the statefile 2019-11-07 17:49:03 -05:00
v4-foreach.out.tfstate read+write the new dependencies in the statefile 2019-11-07 17:49:03 -05:00
v4-modules.in.tfstate read+write the new dependencies in the statefile 2019-11-07 17:49:03 -05:00
v4-modules.out.tfstate read+write the new dependencies in the statefile 2019-11-07 17:49:03 -05:00
v4-simple.in.tfstate statefile: New package for loading and saving state files 2018-10-16 18:49:20 -07:00
v4-simple.out.tfstate statefile: New package for loading and saving state files 2018-10-16 18:49:20 -07:00