mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Fixes: show insensitive plan details when resource in set with sensitive value (#1313)
Signed-off-by: Zejun Chen <tibazq@gmail.com> Signed-off-by: chenzj <tibazq@gmail.com> Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
This commit is contained in:
@@ -435,7 +435,7 @@ func MarshalResourceChanges(resources []*plans.ResourceInstanceChangeSrc, schema
|
||||
if schema.ContainsSensitive() {
|
||||
marks = append(marks, schema.ValueMarks(changeV.Before, nil)...)
|
||||
}
|
||||
bs := jsonstate.SensitiveAsBool(changeV.Before.MarkWithPaths(marks))
|
||||
bs := jsonstate.SensitiveAsBoolWithPathValueMarks(changeV.Before, marks)
|
||||
beforeSensitive, err = ctyjson.Marshal(bs, bs.Type())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -464,7 +464,7 @@ func MarshalResourceChanges(resources []*plans.ResourceInstanceChangeSrc, schema
|
||||
if schema.ContainsSensitive() {
|
||||
marks = append(marks, schema.ValueMarks(changeV.After, nil)...)
|
||||
}
|
||||
as := jsonstate.SensitiveAsBool(changeV.After.MarkWithPaths(marks))
|
||||
as := jsonstate.SensitiveAsBoolWithPathValueMarks(changeV.After, marks)
|
||||
afterSensitive, err = ctyjson.Marshal(as, as.Type())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user