Merge pull request #10104 from pwillis-els/pwillis-els-patch-1

Fix typos in hcl2_upgrade
This commit is contained in:
Megan Marsh 2020-10-14 12:38:07 -07:00 committed by GitHub
commit 84d5de369f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -55,7 +55,7 @@ func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int) {
} }
const ( const (
hcl2UpgradeFileHeader = `# This file was autogenerate by the BETA 'packer hcl2_upgrade' command. We hcl2UpgradeFileHeader = `# This file was autogenerated by the BETA 'packer hcl2_upgrade' command. We
# recommend double checking that everything is correct before going forward. We # recommend double checking that everything is correct before going forward. We
# also recommend treating this file as disposable. The HCL2 blocks in this # also recommend treating this file as disposable. The HCL2 blocks in this
# file can be moved to other files. For example, the variable blocks could be # file can be moved to other files. For example, the variable blocks could be
@ -64,20 +64,20 @@ const (
# once they also need to be in the same folder. 'packer inspect folder/' # once they also need to be in the same folder. 'packer inspect folder/'
# will describe to you what is in that folder. # will describe to you what is in that folder.
# All generated input variables will be of string type as this how Packer JSON # All generated input variables will be of 'string' type as this is how Packer JSON
# views them; you can later on change their type. Read the variables type # views them; you can change their type later on. Read the variables type
# constraints documentation # constraints documentation
# https://www.packer.io/docs/from-1.5/variables#type-constraints for more info. # https://www.packer.io/docs/from-1.5/variables#type-constraints for more info.
` `
sourcesHeader = ` sourcesHeader = `
# source blocks are generated from your builders; a source can be referenced in # source blocks are generated from your builders; a source can be referenced in
# build blocks. A build block runs provisioner and post-processors onto a # build blocks. A build block runs provisioner and post-processors on a
# source. Read the documentation for source blocks here: # source. Read the documentation for source blocks here:
# https://www.packer.io/docs/from-1.5/blocks/source` # https://www.packer.io/docs/from-1.5/blocks/source`
buildHeader = ` buildHeader = `
# a build block invokes sources and runs provisionning steps on them. The # a build block invokes sources and runs provisioning steps on them. The
# documentation for build blocks can be found here: # documentation for build blocks can be found here:
# https://www.packer.io/docs/from-1.5/blocks/build # https://www.packer.io/docs/from-1.5/blocks/build
build { build {
@ -413,14 +413,14 @@ func (*HCL2UpgradeCommand) Help() string {
helpText := ` helpText := `
Usage: packer hcl2_upgrade -output-file=JSON_TEMPLATE.pkr.hcl JSON_TEMPLATE... Usage: packer hcl2_upgrade -output-file=JSON_TEMPLATE.pkr.hcl JSON_TEMPLATE...
Will transform your JSON template to a HCL2 configuration. Will transform your JSON template into an HCL2 configuration.
` `
return strings.TrimSpace(helpText) return strings.TrimSpace(helpText)
} }
func (*HCL2UpgradeCommand) Synopsis() string { func (*HCL2UpgradeCommand) Synopsis() string {
return "transform a JSON template into a HCL2 configuration" return "transform a JSON template into an HCL2 configuration"
} }
func (*HCL2UpgradeCommand) AutocompleteArgs() complete.Predictor { func (*HCL2UpgradeCommand) AutocompleteArgs() complete.Predictor {

View File

@ -1,4 +1,4 @@
# This file was autogenerate by the BETA 'packer hcl2_upgrade' command. We # This file was autogenerated by the BETA 'packer hcl2_upgrade' command. We
# recommend double checking that everything is correct before going forward. We # recommend double checking that everything is correct before going forward. We
# also recommend treating this file as disposable. The HCL2 blocks in this # also recommend treating this file as disposable. The HCL2 blocks in this
# file can be moved to other files. For example, the variable blocks could be # file can be moved to other files. For example, the variable blocks could be
@ -7,8 +7,8 @@
# once they also need to be in the same folder. 'packer inspect folder/' # once they also need to be in the same folder. 'packer inspect folder/'
# will describe to you what is in that folder. # will describe to you what is in that folder.
# All generated input variables will be of string type as this how Packer JSON # All generated input variables will be of 'string' type as this is how Packer JSON
# views them; you can later on change their type. Read the variables type # views them; you can change their type later on. Read the variables type
# constraints documentation # constraints documentation
# https://www.packer.io/docs/from-1.5/variables#type-constraints for more info. # https://www.packer.io/docs/from-1.5/variables#type-constraints for more info.
variable "aws_access_key" { variable "aws_access_key" {
@ -31,7 +31,7 @@ variable "aws_secret_key" {
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
# source blocks are generated from your builders; a source can be referenced in # source blocks are generated from your builders; a source can be referenced in
# build blocks. A build block runs provisioner and post-processors onto a # build blocks. A build block runs provisioner and post-processors on a
# source. Read the documentation for source blocks here: # source. Read the documentation for source blocks here:
# https://www.packer.io/docs/from-1.5/blocks/source # https://www.packer.io/docs/from-1.5/blocks/source
source "amazon-ebs" "autogenerated_1" { source "amazon-ebs" "autogenerated_1" {
@ -70,7 +70,7 @@ source "amazon-ebs" "autogenerated_1" {
} }
} }
# a build block invokes sources and runs provisionning steps on them. The # a build block invokes sources and runs provisioning steps on them. The
# documentation for build blocks can be found here: # documentation for build blocks can be found here:
# https://www.packer.io/docs/from-1.5/blocks/build # https://www.packer.io/docs/from-1.5/blocks/build
build { build {