Merge pull request #27281 from hashicorp/pselle/double-mark

Guard against double marking in other locations in evaluate
This commit is contained in:
Pam Selle 2020-12-15 08:10:49 -05:00 committed by GitHub
commit ad1420cdf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -433,7 +433,7 @@ func (d *evaluationStateData) GetModule(addr addrs.ModuleCall, rng tfdiags.Sourc
instance[cfg.Name] = outputState
if cfg.Sensitive {
if cfg.Sensitive && !outputState.HasMark("sensitive") {
instance[cfg.Name] = outputState.Mark("sensitive")
}
}
@ -462,7 +462,7 @@ func (d *evaluationStateData) GetModule(addr addrs.ModuleCall, rng tfdiags.Sourc
instance[cfg.Name] = change.After
if change.Sensitive {
if change.Sensitive && !change.After.HasMark("sensitive") {
instance[cfg.Name] = change.After.Mark("sensitive")
}
}