terraform/states
Martin Atkins 2eea07750a core: Clean up resource states when they are orphaned
We previously had mechanisms to clean up only individual instance states,
leaving behind empty resource husks in the state after they were all
destroyed.

This takes care of it in the "orphan" case. It does not yet do it in the
"terraform destroy" or "terraform plan -destroy" cases because we don't
have anywhere to record in the plan that we're actually destroying and so
the resource configurations should be ignored and _everything_ should be
cleaned. We'll let the state be not-quite-empty in that case for now,
since it doesn't really hurt; cleaning up orphans is the main case because
the state will live on afterwards and so leftover cruft will accumulate
over the course of many changes.
2018-10-16 19:14:11 -07:00
..
statefile states: object Private data is []byte, not cty.Value 2018-10-16 19:11:09 -07:00
statemgr states/statemgr: don't panic if no state file is present on first write 2018-10-16 19:14:11 -07: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 states: object Private data is []byte, not cty.Value 2018-10-16 19:11:09 -07:00
module.go core: If create leg of create_before_destroy fails, restore deposed 2018-10-16 19:14:11 -07:00
objectstatus_string.go states: New package with modern models for Terraform state 2018-10-16 18:49: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 terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
state.go core: Be more explicit in how we handle create_before_destroy 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_string.go states: In Module.testString, use incrementing ids for deposed 2018-10-16 19:14:11 -07: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 core: Clean up resource states when they are orphaned 2018-10-16 19:14:11 -07:00