mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
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:
committed by
GitHub
parent
5079292cb2
commit
579d74c409
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user