terraform/backend/local
Martin Atkins 12572e97bc core: Automatically upgrade resource instance states on read
If an instance object in state has an earlier schema version number then
it is likely that the schema we're holding won't be able to decode the
raw data that is stored. Instead, we must ask the provider to upgrade it
for us first, which might also include translating it from flatmap form
if it was last updated with a Terraform version earlier than v0.12.

This ends up being a "seam" between our use of int64 for schema versions
in the providers package and uint64 everywhere else. We intend to
standardize on int64 everywhere eventually, but for now this remains
consistent with existing usage in each layer to keep the type conversion
noise contained here and avoid mass-updates to other Terraform components
at this time.

This also includes a minor change to the test helpers for the
backend/local package, which were inexplicably setting a SchemaVersion of
1 on the basic test state but setting the mock schema version to zero,
creating an invalid situation where the state would need to be downgraded.
2018-11-30 11:22:39 -08:00
..
test-fixtures backend/local tests tests tests 2018-10-16 19:14:11 -07:00
backend.go Change how to fall back from remote to local backend 2018-11-20 22:25:52 +01:00
backend_apply.go Implement the remote enhanced backend 2018-11-06 16:29:46 +01:00
backend_apply_test.go Change how to fall back from remote to local backend 2018-11-20 22:25:52 +01:00
backend_local.go backend/remote: implement the Local interface 2018-11-26 20:50:25 +01:00
backend_plan.go core: Make resource type schema versions visible to callers 2018-11-27 15:53:54 -08:00
backend_plan_test.go core: Automatically upgrade resource instance states on read 2018-11-30 11:22:39 -08:00
backend_refresh.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
backend_refresh_test.go Make the test compile again 2018-10-19 15:29:14 +02:00
backend_test.go Implement the remote enhanced backend 2018-11-06 16:29:46 +01:00
cli.go command: Fix TestMetaBackend_configuredChangeCopy_multiToMulti 2018-11-19 09:02:35 -08:00
counthookaction_string.go Update various files for new version of "stringer" 2017-12-11 13:26:29 -08:00
hook_count.go core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00
hook_count_action.go backend/local 2017-01-26 14:33:49 -08:00
hook_count_test.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
hook_state.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
hook_state_test.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
local_test.go backend/local 2017-01-26 14:33:49 -08:00
testing.go Implement the remote enhanced backend 2018-11-06 16:29:46 +01:00