Skip to content

Commit

Permalink
helper/schema: Ensure InstanceDiff RawConfig/RawPlan/RawState are alw…
Browse files Browse the repository at this point in the history
…ays copied during planning (#1024)

Reference: #1023
  • Loading branch information
bflad committed Aug 15, 2022
1 parent 5ba37ad commit 848ee9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1024.txt
@@ -0,0 +1,3 @@
```release-note:bug
helper/schema: Ensured `RawConfig`, `RawPlan`, and `RawState` are correctly copied during planning with recreation
```
3 changes: 3 additions & 0 deletions helper/schema/schema.go
Expand Up @@ -722,6 +722,9 @@ func (m schemaMap) Diff(

// Preserve the DestroyTainted flag
result2.DestroyTainted = result.DestroyTainted
result2.RawConfig = result.RawConfig
result2.RawPlan = result.RawPlan
result2.RawState = result.RawState

// Reset the data to not contain state. We have to call init()
// again in order to reset the FieldReaders.
Expand Down

0 comments on commit 848ee9f

Please sign in to comment.