mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
nonsensitive no longer produces error when applied to values that are not sensitive (#369)
Signed-off-by: Joao C Costa <joao.costa@kit-ar.com>
This commit is contained in:
@@ -52,9 +52,6 @@ var NonsensitiveFunc = function.New(&function.Spec{
|
||||
return args[0].Type(), nil
|
||||
},
|
||||
Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
|
||||
if args[0].IsKnown() && !args[0].HasMark(marks.Sensitive) {
|
||||
return cty.DynamicVal, function.NewArgErrorf(0, "the given value is not sensitive, so this call is redundant")
|
||||
}
|
||||
v, m := args[0].Unmark()
|
||||
delete(m, marks.Sensitive) // remove the sensitive marking
|
||||
return v.WithMarks(m), nil
|
||||
|
||||
Reference in New Issue
Block a user