From fa74710aef0f66c1a0b044ab04b204db1edf0389 Mon Sep 17 00:00:00 2001 From: Pam Selle <204372+pselle@users.noreply.github.com> Date: Mon, 14 Dec 2020 15:26:26 -0500 Subject: [PATCH] Guard against double marking in other locations in evaluate --- terraform/evaluate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/evaluate.go b/terraform/evaluate.go index e880aa93e..c8b49c66c 100644 --- a/terraform/evaluate.go +++ b/terraform/evaluate.go @@ -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") } }