terraform/states
Martin Atkins 9eb32c4536 core: Reinstaint instance tainting, but without mutating objects
Our previous mechanism for dealing with tainting relied on directly
mutating the InstanceState object to mark it as such. In our new state
models we consider the instance objects to be immutable by convention, and
so we frequently copy them. As a result, the taint flagging was no longer
making it all the way through the apply evaluation process.

Here we now implement tainting as a separate step in the evaluation
process, creating a copy of the object with a tainted status if there were
any errors during creation.

This introduces a new behavior where any provider-level errors during
creation will also cause an instance to be marked as tainted if any object
is returned at all. Create-time errors _normally_ result in no object at
all, but the provider might return an object if the failure occurred at
a subsequent step of a multi-step creation process and so left behind a
remote object that needs to be cleaned up on a future run.
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 terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -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 terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -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 terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -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 states: Prune empty modules after possibly removing resources 2018-10-16 19:14:11 -07:00