Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (p *provisioner) GetSchema() (resp provisioners.GetSchemaResponse) {
Type: cty.Map(cty.String),
Optional: true,
},
"quiet": {
Type: cty.Bool,
Optional: true,
},
},
}

Expand Down Expand Up @@ -163,7 +167,14 @@ func (p *provisioner) ProvisionResource(req provisioners.ProvisionResourceReques
go copyUIOutput(req.UIOutput, tee, copyDoneCh)

// Output what we're about to run
req.UIOutput.Output(fmt.Sprintf("Executing: %q", cmdargs))
// if quiet is not set, output the command we're about to run
// if quiet is set, output Executing: Suppressed by quiet=true
if quietVal := req.Config.GetAttr("quiet"); !quietVal.IsNull() && quietVal.True() {
// If quiet is true, don't output the command
req.UIOutput.Output("local-exec: Executing: Suppressed by quiet=true")
} else {
req.UIOutput.Output(fmt.Sprintf("Executing: %q", cmdargs))
}

// Start the command
err = cmd.Start()
Expand Down