Skip to content

Commit e700051

Browse files
jbardinkmoe
authored andcommitted
don't lose track of private data in the ACC tests
This commit was generated from hashicorp/terraform#22837.
1 parent e664f5b commit e700051

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

helper/resource/state_shim.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ func shimNewState(newState *states.State, providers map[string]terraform.Resourc
8181
}
8282

8383
if i.Current.SchemaVersion != 0 {
84-
resState.Primary.Meta = map[string]interface{}{
85-
"schema_version": i.Current.SchemaVersion,
84+
if resState.Primary.Meta == nil {
85+
resState.Primary.Meta = map[string]interface{}{}
8686
}
87+
resState.Primary.Meta["schema_version"] = i.Current.SchemaVersion
8788
}
8889

8990
for _, dep := range i.Current.Dependencies {

0 commit comments

Comments
 (0)