Closed andy-caruso closed 3 years ago
Hi @andy-caruso ,
Can you explain a bit about your use case here? terraform-config-inspect
is a general tool used to inspect configuration, not display it to other users, and I don't think suppressing output is something terraform-config-inspect
should be expected to handle. I'd go as far as to say it's counter-indicated; the whole point is to be able to inspect the given configuration, and that may include sensitive values.
I don't think I explained it well, this change doesn't suppress the output, it populates the Sensitive
field in the Output object when inspecting a terraform module.
type Output struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Sensitive bool `json:"sensitive,omitempty"` <--- Newly added
Pos SourcePos `json:"pos"`
}
I added an example of some use-cases to Feature Request #55
Hi, thanks @andy-caruso !
Your explanation was just fine, but I definitely misinterpreted what I was seeing and indeed thought you were suppressing the value (trust me when I say we yell about terraform's overloaded terminology on a daily basis). This makes sense and I am very sorry I did not look closely enough at first.
Thanks @justincampbell that's all I needed!
If sensitive is not specified or is false it will not be present in the Output object as per omitempty behavior.