terraform: don't set Provider on destroy nodes

This doesn't explicitly set `rs.Provider` on destroy nodes.

To be honest, I'm not sure why this was done in the first place (git
blame points to 6fda7bb5483a155b8ae1e1e4e4b7b7c4073bc1d9). Tests always
passed without it, and by adding it it causes other tests to fail. I
should've never changed those other tests.

Removing it now to get tests passing, this also reverts the test changes
made in 8213824962f085279810f04b60b95d1176a3a3f2.
This commit is contained in:
Mitchell Hashimoto 2016-10-13 18:27:22 -07:00
parent 7c2c9b82a3
commit eb9ecea863
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 0 additions and 8 deletions

View File

@ -2299,7 +2299,6 @@ func TestContext2Apply_multiDepose_createBeforeDestroy(t *testing.T) {
checkStateString(t, state, `
aws_instance.web: (1 deposed)
ID = bar
provider = aws
Deposed ID 1 = foo
`)
@ -2324,7 +2323,6 @@ aws_instance.web: (1 deposed)
checkStateString(t, state, `
aws_instance.web: (2 deposed)
ID = baz
provider = aws
Deposed ID 1 = foo
Deposed ID 2 = bar
`)
@ -2352,7 +2350,6 @@ aws_instance.web: (2 deposed)
checkStateString(t, state, `
aws_instance.web: (1 deposed)
ID = qux
provider = aws
Deposed ID 1 = bar
`)
@ -2374,7 +2371,6 @@ aws_instance.web: (1 deposed)
checkStateString(t, state, `
aws_instance.web:
ID = quux
provider = aws
`)
}

View File

@ -90,7 +90,6 @@ func (n *NodeDestroyResource) EvalTree() EvalNode {
if rs == nil {
rs = &ResourceState{}
}
rs.Provider = n.ProvidedBy()[0]
var diffApply *InstanceDiff
var provider ResourceProvider

View File

@ -298,7 +298,6 @@ aws_instance.lb:
aws_instance.web
aws_instance.web:
ID = foo
provider = aws
require_new = ami-new
type = aws_instance
`
@ -306,7 +305,6 @@ aws_instance.web:
const testTerraformApplyCreateBeforeStr = `
aws_instance.bar:
ID = foo
provider = aws
require_new = xyz
type = aws_instance
`
@ -593,7 +591,6 @@ aws_instance.bar:
const testTerraformApplyErrorDestroyCreateBeforeDestroyStr = `
aws_instance.bar: (1 deposed)
ID = foo
provider = aws
Deposed ID 1 = bar
`