cmd/console: Add config-type flag to command help (#12360)

It is not clear that the console command runs in legacy JSON mode by
default and that users can specify the -config-type flag to toggle HCL2
mode. This change adds the config-type flag to the command's help text
to alert users of the gotcha.

In the next minor Packer release the console command will be updated to
default to HCL2 mode.

Relates to: #12359
Relates to: #10603
pull/12366/head
Wilken Rivera 3 years ago committed by GitHub
parent 06653b98c0
commit e0a5286645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,6 +85,7 @@ Usage: packer console [options] [TEMPLATE]
Options:
-var 'key=value' Variable for templates, can be used multiple times.
-var-file=path JSON or HCL2 file containing user variables.
-config-type Set to 'hcl2' to run in HCL2 mode when no file is passed. Defaults to json.
`
return strings.TrimSpace(helpText)

Loading…
Cancel
Save