Add -show-sensitive flag to tofu plan, apply, state-show and output commands (#1554)

Signed-off-by: siddharthasonker95 <158144589+siddharthasonker95@users.noreply.github.com>
This commit is contained in:
Siddhartha Sonker
2024-07-22 15:28:57 +05:30
committed by GitHub
parent 5079292cb2
commit 579d74c409
25 changed files with 431 additions and 9 deletions

View File

@@ -31,6 +31,9 @@ type Apply struct {
// ViewType specifies which output format to use
ViewType ViewType
// ShowSensitive is used to display the value of variables marked as sensitive.
ShowSensitive bool
}
// ParseApply processes CLI arguments, returning an Apply value and errors.
@@ -47,6 +50,7 @@ func ParseApply(args []string) (*Apply, tfdiags.Diagnostics) {
cmdFlags := extendedFlagSet("apply", apply.State, apply.Operation, apply.Vars)
cmdFlags.BoolVar(&apply.AutoApprove, "auto-approve", false, "auto-approve")
cmdFlags.BoolVar(&apply.InputEnabled, "input", true, "input")
cmdFlags.BoolVar(&apply.ShowSensitive, "show-sensitive", false, "displays sensitive values")
var json bool
cmdFlags.BoolVar(&json, "json", false, "json")