From e0a52866459f86c3dab9581ea0134ca285f4d9bf Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 12 Apr 2023 14:27:39 -0400 Subject: [PATCH] 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 --- command/console.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/console.go b/command/console.go index 431cc1477..54281fdd6 100644 --- a/command/console.go +++ b/command/console.go @@ -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)