terraform/states
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
..
statefile Fix wildcard dependencies when upgrading states 2018-11-15 13:17:15 +01:00
statemgr "go fmt" fixups 2018-11-19 09:02:35 -08:00
doc.go states: New package with modern models for Terraform state 2018-10-16 18:49:20 -07:00
eachmode_string.go states: New package with modern models for Terraform state 2018-10-16 18:49:20 -07:00
instance_generation.go states: New package with modern models for Terraform state 2018-10-16 18:49:20 -07:00
instance_object.go core: Reinstaint instance tainting, but without mutating objects 2018-10-16 19:14:11 -07:00
instance_object_src.go core: Automatically upgrade resource instance states on read 2018-11-30 11:22:39 -08:00
module.go command: Un-stub and reimplement "terraform state rm" 2018-10-16 19:14:11 -07:00
objectstatus_string.go build: Take protoc out of the "go generate" path 2018-10-18 10:39:20 -07:00
output_value.go states: New package with modern models for Terraform state 2018-10-16 18:49:20 -07:00
resource.go core: Be more explicit in how we handle create_before_destroy 2018-10-16 19:14:11 -07:00
resource_test.go states: Fix TestResourceInstanceDeposeCurrentObject 2018-10-16 19:14:11 -07:00
state.go command: Allow tests to run to completion without panics or hangs 2018-10-16 19:14:11 -07:00
state_deepcopy.go states: DeepCopy for ResourceInstanceObject 2018-10-16 19:14:11 -07:00
state_equal.go states: New package with modern models for Terraform state 2018-10-16 18:49:20 -07:00
state_filter.go command/state: update and fix the state show command 2018-10-27 15:15:25 +02:00
state_filter_test.go command/state: update and fix the state mv command 2018-10-27 15:01:07 +02:00
state_string.go add missing key-value from test 2018-11-19 18:58:29 -05:00
state_test.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
sync.go command/state: update and fix the state rm command 2018-10-24 10:59:33 +02:00