diff --git a/.changelog/16243.txt b/.changelog/16243.txt new file mode 100644 index 000000000..5412e5b85 --- /dev/null +++ b/.changelog/16243.txt @@ -0,0 +1,3 @@ +```release-note:improvement +cli: `job plan` help text for running the plan now includes the `-namespace` flag +``` diff --git a/command/job_plan.go b/command/job_plan.go index 204899c52..45c3fbe40 100644 --- a/command/job_plan.go +++ b/command/job_plan.go @@ -262,6 +262,10 @@ func (c *JobPlanCommand) Run(args []string) int { runArgs.WriteString(fmt.Sprintf("-var-file=%q ", varFile)) } + if c.namespace != "" { + runArgs.WriteString(fmt.Sprintf("-namespace=%q ", c.namespace)) + } + exitCode := c.outputPlannedJob(job, resp, diff, verbose) c.Ui.Output(c.Colorize().Color(formatJobModifyIndex(resp.JobModifyIndex, runArgs.String(), path))) return exitCode