mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
core: in testApplyFn, force attribute "id" to match ID field
These two being distinct is an old-world concept, but we need to ensure that they match properly here to ensure that we don't leave dangling incorrect values for "id".
This commit is contained in:
parent
8e34753d5f
commit
cb13d0bb94
@ -180,6 +180,11 @@ func testApplyFn(
|
||||
if d != nil {
|
||||
result = result.MergeDiff(d)
|
||||
}
|
||||
|
||||
// The id attribute always matches ID for the sake of this mock
|
||||
// implementation, since it's following the pre-0.12 assumptions where
|
||||
// these two were treated as synonyms.
|
||||
result.Attributes["id"] = result.ID
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user