mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
Hide sensitive outputs in terraform show
This commit is contained in:
parent
e6e0b6ee46
commit
f61a342311
@ -74,7 +74,11 @@ func State(opts *StateOpts) string {
|
||||
for _, k := range ks {
|
||||
v := m.OutputValues[k]
|
||||
p.buf.WriteString(fmt.Sprintf("%s = ", k))
|
||||
p.writeValue(v.Value, plans.NoOp, 0)
|
||||
if v.Sensitive {
|
||||
p.buf.WriteString("(sensitive value)")
|
||||
} else {
|
||||
p.writeValue(v.Value, plans.NoOp, 0)
|
||||
}
|
||||
p.buf.WriteString("\n")
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ map_var = {
|
||||
"first" = "foo"
|
||||
"second" = "bar"
|
||||
}
|
||||
sensitive_var = "secret!!!"
|
||||
sensitive_var = (sensitive value)
|
||||
string_var = "string value"`
|
||||
|
||||
func basicState(t *testing.T) *states.State {
|
||||
|
Loading…
Reference in New Issue
Block a user