Commit 1cb9aea7 authored by Megan Marsh's avatar Megan Marsh
Browse files

change markdown references to new pathing

parent cca31097
Showing with 45 additions and 45 deletions
+45 -45
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
[GH-10377] [GH-10377]
* **New function** `env` allows users to set the default value of a variable to * **New function** `env` allows users to set the default value of a variable to
the value of an environment variable. Please see [env function the value of an environment variable. Please see [env function
docs](https://www.packer.io/docs/from-1.5/functions/contextual/env") for docs](https://www.packer.io//docs/templates/hcl_templates/functions/contextual/env") for
more details. [GH-10240] more details. [GH-10240]
* **Future Scaffolding** This release contains a large number of no-op * **Future Scaffolding** This release contains a large number of no-op
refactoring changes. The Packer team at HashiCorp is preparing to split the refactoring changes. The Packer team at HashiCorp is preparing to split the
......
...@@ -153,7 +153,7 @@ type AlicloudImageConfig struct { ...@@ -153,7 +153,7 @@ type AlicloudImageConfig struct {
AlicloudImageTags map[string]string `mapstructure:"tags" required:"false"` AlicloudImageTags map[string]string `mapstructure:"tags" required:"false"`
// Same as [`tags`](#tags) but defined as a singular repeatable block // Same as [`tags`](#tags) but defined as a singular repeatable block
// containing a `key` and a `value` field. In HCL2 mode the // containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
AlicloudImageTag config.KeyValues `mapstructure:"tag" required:"false"` AlicloudImageTag config.KeyValues `mapstructure:"tag" required:"false"`
AlicloudDiskDevices `mapstructure:",squash"` AlicloudDiskDevices `mapstructure:",squash"`
......
...@@ -167,7 +167,7 @@ type Config struct { ...@@ -167,7 +167,7 @@ type Config struct {
RootVolumeTags map[string]string `mapstructure:"root_volume_tags" required:"false"` RootVolumeTags map[string]string `mapstructure:"root_volume_tags" required:"false"`
// Same as [`root_volume_tags`](#root_volume_tags) but defined as a // Same as [`root_volume_tags`](#root_volume_tags) but defined as a
// singular block containing a `key` and a `value` field. In HCL2 mode the // singular block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
RootVolumeTag config.KeyValues `mapstructure:"root_volume_tag" required:"false"` RootVolumeTag config.KeyValues `mapstructure:"root_volume_tag" required:"false"`
// Whether or not to encrypt the volumes that are *launched*. By default, Packer will keep // Whether or not to encrypt the volumes that are *launched*. By default, Packer will keep
......
...@@ -52,7 +52,7 @@ type AMIConfig struct { ...@@ -52,7 +52,7 @@ type AMIConfig struct {
AMITags map[string]string `mapstructure:"tags" required:"false"` AMITags map[string]string `mapstructure:"tags" required:"false"`
// Same as [`tags`](#tags) but defined as a singular repeatable block // Same as [`tags`](#tags) but defined as a singular repeatable block
// containing a `key` and a `value` field. In HCL2 mode the // containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
AMITag config.KeyValues `mapstructure:"tag" required:"false"` AMITag config.KeyValues `mapstructure:"tag" required:"false"`
// Enable enhanced networking (ENA but not SriovNetSupport) on // Enable enhanced networking (ENA but not SriovNetSupport) on
...@@ -142,7 +142,7 @@ type AMIConfig struct { ...@@ -142,7 +142,7 @@ type AMIConfig struct {
SnapshotTags map[string]string `mapstructure:"snapshot_tags" required:"false"` SnapshotTags map[string]string `mapstructure:"snapshot_tags" required:"false"`
// Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular // Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
// repeatable block containing a `key` and a `value` field. In HCL2 mode the // repeatable block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
SnapshotTag config.KeyValues `mapstructure:"snapshot_tag" required:"false"` SnapshotTag config.KeyValues `mapstructure:"snapshot_tag" required:"false"`
// A list of account IDs that have // A list of account IDs that have
......
...@@ -204,7 +204,7 @@ type RunConfig struct { ...@@ -204,7 +204,7 @@ type RunConfig struct {
RunTags map[string]string `mapstructure:"run_tags" required:"false"` RunTags map[string]string `mapstructure:"run_tags" required:"false"`
// Same as [`run_tags`](#run_tags) but defined as a singular repeatable // Same as [`run_tags`](#run_tags) but defined as a singular repeatable
// block containing a `key` and a `value` field. In HCL2 mode the // block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
RunTag config.KeyValues `mapstructure:"run_tag" required:"false"` RunTag config.KeyValues `mapstructure:"run_tag" required:"false"`
// The ID (not the name) of the security // The ID (not the name) of the security
...@@ -319,7 +319,7 @@ type RunConfig struct { ...@@ -319,7 +319,7 @@ type RunConfig struct {
SpotTags map[string]string `mapstructure:"spot_tags" required:"false"` SpotTags map[string]string `mapstructure:"spot_tags" required:"false"`
// Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block // Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
// containing a `key` and a `value` field. In HCL2 mode the // containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
SpotTag config.KeyValues `mapstructure:"spot_tag" required:"false"` SpotTag config.KeyValues `mapstructure:"spot_tag" required:"false"`
// Filters used to populate the `subnet_id` field. // Filters used to populate the `subnet_id` field.
......
...@@ -58,7 +58,7 @@ type Config struct { ...@@ -58,7 +58,7 @@ type Config struct {
VolumeRunTags map[string]string `mapstructure:"run_volume_tags"` VolumeRunTags map[string]string `mapstructure:"run_volume_tags"`
// Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular // Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
// block containing a `name` and a `value` field. In HCL2 mode the // block containing a `name` and a `value` field. In HCL2 mode the
// [`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks) // [`dynamic_block`](https://packer.io/docs/templates/hcl_templates/expressions.html#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"` VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"`
// Relevant only to Windows guests: If you set this flag, we'll add clauses // Relevant only to Windows guests: If you set this flag, we'll add clauses
......
...@@ -64,7 +64,7 @@ type Config struct { ...@@ -64,7 +64,7 @@ type Config struct {
VolumeRunTags map[string]string `mapstructure:"run_volume_tags"` VolumeRunTags map[string]string `mapstructure:"run_volume_tags"`
// Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular // Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
// block containing a `name` and a `value` field. In HCL2 mode the // block containing a `name` and a `value` field. In HCL2 mode the
// [`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks) // [`dynamic_block`](https://packer.io/docs/templates/hcl_templates/expressions.html#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"` VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"`
// what architecture to use when registering the // what architecture to use when registering the
......
...@@ -17,7 +17,7 @@ type BlockDevice struct { ...@@ -17,7 +17,7 @@ type BlockDevice struct {
Tags map[string]string `mapstructure:"tags" required:"false"` Tags map[string]string `mapstructure:"tags" required:"false"`
// Same as [`tags`](#tags) but defined as a singular repeatable block // Same as [`tags`](#tags) but defined as a singular repeatable block
// containing a `key` and a `value` field. In HCL2 mode the // containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
Tag config.KeyValues `mapstructure:"tag" required:"false"` Tag config.KeyValues `mapstructure:"tag" required:"false"`
} }
......
...@@ -70,7 +70,7 @@ type Config struct { ...@@ -70,7 +70,7 @@ type Config struct {
// Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular // Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
// repeatable block containing a `key` and a `value` field. In HCL2 mode // repeatable block containing a `key` and a `value` field. In HCL2 mode
// the // the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
VolumeRunTag config.KeyValues `mapstructure:"run_volume_tag"` VolumeRunTag config.KeyValues `mapstructure:"run_volume_tag"`
......
...@@ -290,7 +290,7 @@ type Config struct { ...@@ -290,7 +290,7 @@ type Config struct {
AzureTags map[string]string `mapstructure:"azure_tags" required:"false"` AzureTags map[string]string `mapstructure:"azure_tags" required:"false"`
// Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block // Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
// containing a `name` and a `value` field. In HCL2 mode the // containing a `name` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
AzureTag config.NameValues `mapstructure:"azure_tag" required:"false"` AzureTag config.NameValues `mapstructure:"azure_tag" required:"false"`
// Resource group under which the final artifact will be stored. // Resource group under which the final artifact will be stored.
......
...@@ -64,7 +64,7 @@ type Config struct { ...@@ -64,7 +64,7 @@ type Config struct {
ImageTags map[string]string `mapstructure:"image_tags" required:"false"` ImageTags map[string]string `mapstructure:"image_tags" required:"false"`
// Same as [`image_tags`](#image_tags) but defined as a singular repeatable // Same as [`image_tags`](#image_tags) but defined as a singular repeatable
// block containing a `key` and a `value` field. In HCL2 mode the // block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
ImageTag config.KeyValues `mapstructure:"image_tag" required:"false"` ImageTag config.KeyValues `mapstructure:"image_tag" required:"false"`
// The service of the resulting image. // The service of the resulting image.
...@@ -77,7 +77,7 @@ type Config struct { ...@@ -77,7 +77,7 @@ type Config struct {
VmTags map[string]string `mapstructure:"vm_tags" required:"false"` VmTags map[string]string `mapstructure:"vm_tags" required:"false"`
// Same as [`vm_tags`](#vm_tags) but defined as a singular repeatable block // Same as [`vm_tags`](#vm_tags) but defined as a singular repeatable block
// containing a `key` and a `value` field. In HCL2 mode the // containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
VmTag config.NameValues `mapstructure:"vm_tag" required:"false"` VmTag config.NameValues `mapstructure:"vm_tag" required:"false"`
// The name of the created disk. // The name of the created disk.
......
...@@ -89,7 +89,7 @@ type TencentCloudRunConfig struct { ...@@ -89,7 +89,7 @@ type TencentCloudRunConfig struct {
RunTags map[string]string `mapstructure:"run_tags" required:"false"` RunTags map[string]string `mapstructure:"run_tags" required:"false"`
// Same as [`run_tags`](#run_tags) but defined as a singular repeatable // Same as [`run_tags`](#run_tags) but defined as a singular repeatable
// block containing a `key` and a `value` field. In HCL2 mode the // block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
RunTag config.KeyValues `mapstructure:"run_tag" required:"false"` RunTag config.KeyValues `mapstructure:"run_tag" required:"false"`
......
...@@ -57,7 +57,7 @@ type SourceMachineConfig struct { ...@@ -57,7 +57,7 @@ type SourceMachineConfig struct {
MachineTags map[string]string `mapstructure:"source_machine_tags" required:"false"` MachineTags map[string]string `mapstructure:"source_machine_tags" required:"false"`
// Same as [`source_machine_tags`](#source_machine_tags) but defined as a // Same as [`source_machine_tags`](#source_machine_tags) but defined as a
// singular block containing a `key` and a `value` field. In HCL2 mode the // singular block containing a `key` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
MachineTag config.KeyValues `mapstructure:"source_machine_tag" required:"false"` MachineTag config.KeyValues `mapstructure:"source_machine_tag" required:"false"`
// Whether or not the firewall // Whether or not the firewall
......
...@@ -39,7 +39,7 @@ type TargetImageConfig struct { ...@@ -39,7 +39,7 @@ type TargetImageConfig struct {
ImageTags map[string]string `mapstructure:"image_tags" required:"false"` ImageTags map[string]string `mapstructure:"image_tags" required:"false"`
// Same as [`image_tags`](#image_tags) but defined as a singular repeatable // Same as [`image_tags`](#image_tags) but defined as a singular repeatable
// block containing a `name` and a `value` field. In HCL2 mode the // block containing a `name` and a `value` field. In HCL2 mode the
// [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // [`dynamic_block`](/docs/templates/hcl_templates/expressions#dynamic-blocks)
// will allow you to create those programatically. // will allow you to create those programatically.
ImageTag config.NameValues `mapstructure:"image_tag" required:"false"` ImageTag config.NameValues `mapstructure:"image_tag" required:"false"`
} }
......
...@@ -72,23 +72,23 @@ const ( ...@@ -72,23 +72,23 @@ const (
# All generated input variables will be of 'string' type as this is how Packer JSON # All generated input variables will be of 'string' type as this is how Packer JSON
# views them; you can change their type later on. 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/templates/hcl_templates/variables#type-constraints for more info.
` `
packerBlockHeader = ` packerBlockHeader = `
# See https://www.packer.io/docs/from-1.5/blocks/packer for more info # See https://www.packer.io//docs/templates/hcl_templates/blocks/packer 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 on 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/templates/hcl_templates/blocks/source`
buildHeader = ` buildHeader = `
# a build block invokes sources and runs provisioning 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/templates/hcl_templates/blocks/build
build { build {
` `
) )
...@@ -343,44 +343,44 @@ func transposeTemplatingCalls(s []byte) []byte { ...@@ -343,44 +343,44 @@ func transposeTemplatingCalls(s []byte) []byte {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"lower", "lower",
"`lower(var.example)`", "`lower(var.example)`",
"https://www.packer.io/docs/from-1.5/functions/string/lower", "https://www.packer.io//docs/templates/hcl_templates/functions/string/lower",
} }
}, },
"upper": func(_ string) (string, error) { "upper": func(_ string) (string, error) {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"upper", "upper",
"`upper(var.example)`", "`upper(var.example)`",
"https://www.packer.io/docs/from-1.5/functions/string/upper", "https://www.packer.io//docs/templates/hcl_templates/functions/string/upper",
} }
}, },
"split": func(_, _ string, _ int) (string, error) { "split": func(_, _ string, _ int) (string, error) {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"split", "split",
"`split(separator, string)`", "`split(separator, string)`",
"https://www.packer.io/docs/from-1.5/functions/string/split", "https://www.packer.io//docs/templates/hcl_templates/functions/string/split",
} }
}, },
"replace": func(_, _, _ string, _ int) (string, error) { "replace": func(_, _, _ string, _ int) (string, error) {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"replace", "replace",
"`replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`", "`replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`",
"https://www.packer.io/docs/from-1.5/functions/string/replace or https://www.packer.io/docs/from-1.5/functions/string/regex_replace", "https://www.packer.io//docs/templates/hcl_templates/functions/string/replace or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace",
} }
}, },
"replace_all": func(_, _, _ string) (string, error) { "replace_all": func(_, _, _ string) (string, error) {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"replace_all", "replace_all",
"`replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`", "`replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`",
"https://www.packer.io/docs/from-1.5/functions/string/replace or https://www.packer.io/docs/from-1.5/functions/string/regex_replace", "https://www.packer.io//docs/templates/hcl_templates/functions/string/replace or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace",
} }
}, },
"clean_resource_name": func(_ string) (string, error) { "clean_resource_name": func(_ string) (string, error) {
return "", UnhandleableArgumentError{ return "", UnhandleableArgumentError{
"clean_resource_name", "clean_resource_name",
"use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`", "use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`",
"https://packer.io/docs/from-1.5/variables#custom-validation-rules" + "https://packer.io//docs/templates/hcl_templates/variables#custom-validation-rules" +
" , https://www.packer.io/docs/from-1.5/functions/string/replace" + " , https://www.packer.io//docs/templates/hcl_templates/functions/string/replace" +
" or https://www.packer.io/docs/from-1.5/functions/string/regex_replace", " or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace",
} }
}, },
"build_name": func() string { "build_name": func() string {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# and HCL2 calls (for example '${ var.string_value_example }' ). They won't be # and HCL2 calls (for example '${ var.string_value_example }' ). They won't be
# executed together and the outcome will be unknown. # executed together and the outcome will be unknown.
# See https://www.packer.io/docs/from-1.5/blocks/packer for more info # See https://www.packer.io//docs/templates/hcl_templates/blocks/packer for more info
packer { packer {
required_version = ">= 1.6.0" required_version = ">= 1.6.0"
} }
...@@ -19,7 +19,7 @@ packer { ...@@ -19,7 +19,7 @@ packer {
# All generated input variables will be of 'string' type as this is how Packer JSON # All generated input variables will be of 'string' type as this is how Packer JSON
# views them; you can change their type later on. 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/templates/hcl_templates/variables#type-constraints for more info.
variable "aws_access_key" { variable "aws_access_key" {
type = string type = string
default = "" default = ""
...@@ -53,7 +53,7 @@ locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } ...@@ -53,7 +53,7 @@ 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 on 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/templates/hcl_templates/blocks/source
source "amazon-ebs" "autogenerated_1" { source "amazon-ebs" "autogenerated_1" {
access_key = "${var.aws_access_key}" access_key = "${var.aws_access_key}"
ami_description = "Ubuntu 16.04 LTS - expand root partition" ami_description = "Ubuntu 16.04 LTS - expand root partition"
...@@ -92,7 +92,7 @@ source "amazon-ebs" "autogenerated_1" { ...@@ -92,7 +92,7 @@ source "amazon-ebs" "autogenerated_1" {
# a build block invokes sources and runs provisioning 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/templates/hcl_templates/blocks/build
build { build {
sources = ["source.amazon-ebs.autogenerated_1"] sources = ["source.amazon-ebs.autogenerated_1"]
...@@ -105,7 +105,7 @@ build { ...@@ -105,7 +105,7 @@ build {
# template: hcl2_upgrade:2:38: executing "hcl2_upgrade" at <clean_resource_name>: error calling clean_resource_name: unhandled "clean_resource_name" call: # template: hcl2_upgrade:2:38: executing "hcl2_upgrade" at <clean_resource_name>: error calling clean_resource_name: unhandled "clean_resource_name" call:
# there is no way to automatically upgrade the "clean_resource_name" call. # there is no way to automatically upgrade the "clean_resource_name" call.
# Please manually upgrade to use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)` # Please manually upgrade to use custom validation rules, `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`
# Visit https://packer.io/docs/from-1.5/variables#custom-validation-rules , https://www.packer.io/docs/from-1.5/functions/string/replace or https://www.packer.io/docs/from-1.5/functions/string/regex_replace for more infos. # Visit https://packer.io//docs/templates/hcl_templates/variables#custom-validation-rules , https://www.packer.io//docs/templates/hcl_templates/functions/string/replace or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo mybuild-{{isotime | clean_resource_name}}"] inline = ["echo mybuild-{{isotime | clean_resource_name}}"]
} }
...@@ -113,7 +113,7 @@ build { ...@@ -113,7 +113,7 @@ build {
# template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at <lower>: error calling lower: unhandled "lower" call: # template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at <lower>: error calling lower: unhandled "lower" call:
# there is no way to automatically upgrade the "lower" call. # there is no way to automatically upgrade the "lower" call.
# Please manually upgrade to `lower(var.example)` # Please manually upgrade to `lower(var.example)`
# Visit https://www.packer.io/docs/from-1.5/functions/string/lower for more infos. # Visit https://www.packer.io//docs/templates/hcl_templates/functions/string/lower for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo {{ `SOMETHING` | lower }}"] inline = ["echo {{ `SOMETHING` | lower }}"]
} }
...@@ -121,7 +121,7 @@ build { ...@@ -121,7 +121,7 @@ build {
# template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at <upper>: error calling upper: unhandled "upper" call: # template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at <upper>: error calling upper: unhandled "upper" call:
# there is no way to automatically upgrade the "upper" call. # there is no way to automatically upgrade the "upper" call.
# Please manually upgrade to `upper(var.example)` # Please manually upgrade to `upper(var.example)`
# Visit https://www.packer.io/docs/from-1.5/functions/string/upper for more infos. # Visit https://www.packer.io//docs/templates/hcl_templates/functions/string/upper for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo {{ `something` | upper }}"] inline = ["echo {{ `something` | upper }}"]
} }
...@@ -129,7 +129,7 @@ build { ...@@ -129,7 +129,7 @@ build {
# template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <split `some-string` `-` 0>: error calling split: unhandled "split" call: # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <split `some-string` `-` 0>: error calling split: unhandled "split" call:
# there is no way to automatically upgrade the "split" call. # there is no way to automatically upgrade the "split" call.
# Please manually upgrade to `split(separator, string)` # Please manually upgrade to `split(separator, string)`
# Visit https://www.packer.io/docs/from-1.5/functions/string/split for more infos. # Visit https://www.packer.io//docs/templates/hcl_templates/functions/string/split for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo {{ split `some-string` `-` 0 }}"] inline = ["echo {{ split `some-string` `-` 0 }}"]
} }
...@@ -137,7 +137,7 @@ build { ...@@ -137,7 +137,7 @@ build {
# template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <replace_all `-` `/` build_name>: error calling replace_all: unhandled "replace_all" call: # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <replace_all `-` `/` build_name>: error calling replace_all: unhandled "replace_all" call:
# there is no way to automatically upgrade the "replace_all" call. # there is no way to automatically upgrade the "replace_all" call.
# Please manually upgrade to `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)` # Please manually upgrade to `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`
# Visit https://www.packer.io/docs/from-1.5/functions/string/replace or https://www.packer.io/docs/from-1.5/functions/string/regex_replace for more infos. # Visit https://www.packer.io//docs/templates/hcl_templates/functions/string/replace or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo {{ replace_all `-` `/` build_name }}"] inline = ["echo {{ replace_all `-` `/` build_name }}"]
} }
...@@ -145,7 +145,7 @@ build { ...@@ -145,7 +145,7 @@ build {
# template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <replace `some-string` `-` `/` 1>: error calling replace: unhandled "replace" call: # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at <replace `some-string` `-` `/` 1>: error calling replace: unhandled "replace" call:
# there is no way to automatically upgrade the "replace" call. # there is no way to automatically upgrade the "replace" call.
# Please manually upgrade to `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)` # Please manually upgrade to `replace(string, substring, replacement)` or `regex_replace(string, substring, replacement)`
# Visit https://www.packer.io/docs/from-1.5/functions/string/replace or https://www.packer.io/docs/from-1.5/functions/string/regex_replace for more infos. # Visit https://www.packer.io//docs/templates/hcl_templates/functions/string/replace or https://www.packer.io//docs/templates/hcl_templates/functions/string/regex_replace for more infos.
provisioner "shell" { provisioner "shell" {
inline = ["echo {{ replace `some-string` `-` `/` 1 }}"] inline = ["echo {{ replace `some-string` `-` `/` 1 }}"]
} }
......
...@@ -156,7 +156,7 @@ func (v *Variable) Value() (cty.Value, hcl.Diagnostics) { ...@@ -156,7 +156,7 @@ func (v *Variable) Value() (cty.Value, hcl.Diagnostics) {
Severity: hcl.DiagError, Severity: hcl.DiagError,
Summary: fmt.Sprintf("Unset variable %q", v.Name), Summary: fmt.Sprintf("Unset variable %q", v.Name),
Detail: "A used variable must be set or have a default value; see " + Detail: "A used variable must be set or have a default value; see " +
"https://packer.io/docs/configuration/from-1.5/syntax for " + "https://packer.io/docs/templates/hcl_templates/syntax for " +
"details.", "details.",
Context: v.Range.Ptr(), Context: v.Range.Ptr(),
}} }}
......
...@@ -59,7 +59,7 @@ func decodeVersionConstraint(attr *hcl.Attribute) (VersionConstraint, hcl.Diagno ...@@ -59,7 +59,7 @@ func decodeVersionConstraint(attr *hcl.Attribute) (VersionConstraint, hcl.Diagno
diags = append(diags, &hcl.Diagnostic{ diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError, Severity: hcl.DiagError,
Summary: "Invalid version constraint", Summary: "Invalid version constraint",
Detail: "This string does not use correct version constraint syntax. Check out the docs: https://packer.io/docs/from-1.5/blocks/packer#version-constraints", Detail: "This string does not use correct version constraint syntax. Check out the docs: https://packer.io//docs/templates/hcl_templates/blocks/packer#version-constraints",
Subject: attr.Expr.Range().Ptr(), Subject: attr.Expr.Range().Ptr(),
}) })
return ret, diags return ret, diags
......
...@@ -142,7 +142,7 @@ Here is a basic example. It is completely valid except for the access keys: ...@@ -142,7 +142,7 @@ Here is a basic example. It is completely valid except for the access keys:
// set the environment variables to have the same name as the declared // set the environment variables to have the same name as the declared
// variables, with the prefix PKR_VAR_. // variables, with the prefix PKR_VAR_.
// There are other ways to [set variables](/docs/from-1.5/variables#assigning-values-to-build-variables), including from a var // There are other ways to [set variables](//docs/templates/hcl_templates/variables#assigning-values-to-build-variables), including from a var
// file or as a command argument. // file or as a command argument.
// export PKR_VAR_aws_access_key=$YOURKEY // export PKR_VAR_aws_access_key=$YOURKEY
...@@ -514,7 +514,7 @@ variables are available: ...@@ -514,7 +514,7 @@ variables are available:
## Build Shared Information Variables ## Build Shared Information Variables
This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/engine) for JSON and [contextual variables](/docs/from-1.5/contextual-variables) for HCL2. This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/engine) for JSON and [contextual variables](//docs/templates/hcl_templates/contextual-variables) for HCL2.
The generated variables available for this builder are: The generated variables available for this builder are:
......
...@@ -158,7 +158,7 @@ run: ...@@ -158,7 +158,7 @@ run:
// set the environment variables to have the same name as the declared // set the environment variables to have the same name as the declared
// variables, with the prefix PKR_VAR_. // variables, with the prefix PKR_VAR_.
// There are other ways to [set variables](/docs/from-1.5/variables#assigning-values-to-build-variables) // There are other ways to [set variables](//docs/templates/hcl_templates/variables#assigning-values-to-build-variables)
// including from a var file or as a command argument. // including from a var file or as a command argument.
// export PKR_VAR_aws_access_key=$YOURKEY // export PKR_VAR_aws_access_key=$YOURKEY
...@@ -323,7 +323,7 @@ variables are available: ...@@ -323,7 +323,7 @@ variables are available:
## Build Shared Information Variables ## Build Shared Information Variables
This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/engine) for JSON and [contextual variables](/docs/from-1.5/contextual-variables) for HCL2. This builder generates data that are shared with provisioner and post-processor via build function of [template engine](/docs/templates/engine) for JSON and [contextual variables](//docs/templates/hcl_templates/contextual-variables) for HCL2.
The generated variables available for this builder are: The generated variables available for this builder are:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment