Hide behind envvars

This commit is contained in:
Fraser Waters 2021-11-15 09:58:30 +00:00
parent 5b6a03f548
commit b1a64a65ca
2 changed files with 12 additions and 8 deletions

View file

@ -233,9 +233,11 @@ func newPreviewCmd() *cobra.Command {
cmd.PersistentFlags().BoolVar(
&configPath, "config-path", false,
"Config keys contain a path to a property in a map or list to set")
cmd.PersistentFlags().StringVar(
&planFilePath, "save-constaints", "",
"Save the operations proposed by the preview to a constraints file at the given path")
if hasExperimentalCommands() {
cmd.PersistentFlags().StringVar(
&planFilePath, "save-constaints", "",
"Save the operations proposed by the preview to a constraints file at the given path")
}
cmd.Flags().BoolVarP(
&showSecrets, "show-secrets", "", false, "Emit secrets in plaintext in the plan file. Defaults to `false`")

View file

@ -522,11 +522,13 @@ func newUpCmd() *cobra.Command {
&yes, "yes", "y", false,
"Automatically approve and perform the update after previewing it")
cmd.PersistentFlags().StringVar(
&planFilePath, "constraints-file", "",
"Path to a constraints file to use for the update. The update will not "+
"perform operations that exceed its constraints (e.g. replacements instead of updates, or updates instead"+
"of sames).")
if hasExperimentalCommands() {
cmd.PersistentFlags().StringVar(
&planFilePath, "constraints-file", "",
"Path to a constraints file to use for the update. The update will not "+
"perform operations that exceed its constraints (e.g. replacements instead of updates, or updates instead"+
"of sames).")
}
if hasDebugCommands() {
cmd.PersistentFlags().StringVar(