diff --git a/CHANGELOG.md b/CHANGELOG.md index 54097647e..ec6e55448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ [GH-10377] * **New function** `env` allows users to set the default value of a variable to 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] * **Future Scaffolding** This release contains a large number of no-op refactoring changes. The Packer team at HashiCorp is preparing to split the diff --git a/builder/alicloud/ecs/image_config.go b/builder/alicloud/ecs/image_config.go index 69b452316..c39d4c96c 100644 --- a/builder/alicloud/ecs/image_config.go +++ b/builder/alicloud/ecs/image_config.go @@ -153,7 +153,7 @@ type AlicloudImageConfig struct { AlicloudImageTags map[string]string `mapstructure:"tags" required:"false"` // Same as [`tags`](#tags) but defined as a singular 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. AlicloudImageTag config.KeyValues `mapstructure:"tag" required:"false"` AlicloudDiskDevices `mapstructure:",squash"` diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go index 23d5be8f4..450963978 100644 --- a/builder/amazon/chroot/builder.go +++ b/builder/amazon/chroot/builder.go @@ -167,7 +167,7 @@ type Config struct { RootVolumeTags map[string]string `mapstructure:"root_volume_tags" required:"false"` // 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 - // [`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. RootVolumeTag config.KeyValues `mapstructure:"root_volume_tag" required:"false"` // Whether or not to encrypt the volumes that are *launched*. By default, Packer will keep diff --git a/builder/amazon/common/ami_config.go b/builder/amazon/common/ami_config.go index 2f9620bd2..3fb103a4f 100644 --- a/builder/amazon/common/ami_config.go +++ b/builder/amazon/common/ami_config.go @@ -52,7 +52,7 @@ type AMIConfig struct { AMITags map[string]string `mapstructure:"tags" required:"false"` // Same as [`tags`](#tags) but defined as a singular 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. AMITag config.KeyValues `mapstructure:"tag" required:"false"` // Enable enhanced networking (ENA but not SriovNetSupport) on @@ -142,7 +142,7 @@ type AMIConfig struct { SnapshotTags map[string]string `mapstructure:"snapshot_tags" required:"false"` // Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular // 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. SnapshotTag config.KeyValues `mapstructure:"snapshot_tag" required:"false"` // A list of account IDs that have diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go index d64f8f2ef..c64ce1337 100644 --- a/builder/amazon/common/run_config.go +++ b/builder/amazon/common/run_config.go @@ -204,7 +204,7 @@ type RunConfig struct { RunTags map[string]string `mapstructure:"run_tags" required:"false"` // Same as [`run_tags`](#run_tags) but defined as a singular 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. RunTag config.KeyValues `mapstructure:"run_tag" required:"false"` // The ID (not the name) of the security @@ -319,7 +319,7 @@ type RunConfig struct { SpotTags map[string]string `mapstructure:"spot_tags" required:"false"` // Same as [`spot_tags`](#spot_tags) but defined as a singular 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. SpotTag config.KeyValues `mapstructure:"spot_tag" required:"false"` // Filters used to populate the `subnet_id` field. diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index 106b52f9b..d7c387ace 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -58,7 +58,7 @@ type Config struct { VolumeRunTags map[string]string `mapstructure:"run_volume_tags"` // 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 - // [`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. VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"` // Relevant only to Windows guests: If you set this flag, we'll add clauses diff --git a/builder/amazon/ebssurrogate/builder.go b/builder/amazon/ebssurrogate/builder.go index 1d02ec505..4c5387442 100644 --- a/builder/amazon/ebssurrogate/builder.go +++ b/builder/amazon/ebssurrogate/builder.go @@ -64,7 +64,7 @@ type Config struct { VolumeRunTags map[string]string `mapstructure:"run_volume_tags"` // 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 - // [`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. VolumeRunTag config.NameValues `mapstructure:"run_volume_tag" required:"false"` // what architecture to use when registering the diff --git a/builder/amazon/ebsvolume/block_device.go b/builder/amazon/ebsvolume/block_device.go index a16b90344..f82803d94 100644 --- a/builder/amazon/ebsvolume/block_device.go +++ b/builder/amazon/ebsvolume/block_device.go @@ -17,7 +17,7 @@ type BlockDevice struct { Tags map[string]string `mapstructure:"tags" required:"false"` // Same as [`tags`](#tags) but defined as a singular 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. Tag config.KeyValues `mapstructure:"tag" required:"false"` } diff --git a/builder/amazon/ebsvolume/builder.go b/builder/amazon/ebsvolume/builder.go index 5ef27ec77..0115d9e54 100644 --- a/builder/amazon/ebsvolume/builder.go +++ b/builder/amazon/ebsvolume/builder.go @@ -70,7 +70,7 @@ type Config struct { // 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 // 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. VolumeRunTag config.KeyValues `mapstructure:"run_volume_tag"` diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index 366b893b7..0e7382be9 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -290,7 +290,7 @@ type Config struct { AzureTags map[string]string `mapstructure:"azure_tags" required:"false"` // Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable 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. AzureTag config.NameValues `mapstructure:"azure_tag" required:"false"` // Resource group under which the final artifact will be stored. diff --git a/builder/hyperone/config.go b/builder/hyperone/config.go index 80c8e5d45..c63f6d273 100644 --- a/builder/hyperone/config.go +++ b/builder/hyperone/config.go @@ -64,7 +64,7 @@ type Config struct { ImageTags map[string]string `mapstructure:"image_tags" required:"false"` // Same as [`image_tags`](#image_tags) but defined as a singular 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. ImageTag config.KeyValues `mapstructure:"image_tag" required:"false"` // The service of the resulting image. @@ -77,7 +77,7 @@ type Config struct { VmTags map[string]string `mapstructure:"vm_tags" required:"false"` // Same as [`vm_tags`](#vm_tags) but defined as a singular 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. VmTag config.NameValues `mapstructure:"vm_tag" required:"false"` // The name of the created disk. diff --git a/builder/tencentcloud/cvm/run_config.go b/builder/tencentcloud/cvm/run_config.go index 65979e974..46256adcf 100644 --- a/builder/tencentcloud/cvm/run_config.go +++ b/builder/tencentcloud/cvm/run_config.go @@ -89,7 +89,7 @@ type TencentCloudRunConfig struct { RunTags map[string]string `mapstructure:"run_tags" required:"false"` // Same as [`run_tags`](#run_tags) but defined as a singular 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. RunTag config.KeyValues `mapstructure:"run_tag" required:"false"` diff --git a/builder/triton/source_machine_config.go b/builder/triton/source_machine_config.go index 17f0f7553..0387a6624 100644 --- a/builder/triton/source_machine_config.go +++ b/builder/triton/source_machine_config.go @@ -57,7 +57,7 @@ type SourceMachineConfig struct { MachineTags map[string]string `mapstructure:"source_machine_tags" required:"false"` // 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 - // [`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. MachineTag config.KeyValues `mapstructure:"source_machine_tag" required:"false"` // Whether or not the firewall diff --git a/builder/triton/target_image_config.go b/builder/triton/target_image_config.go index 5a90a18c6..d5df9900b 100644 --- a/builder/triton/target_image_config.go +++ b/builder/triton/target_image_config.go @@ -39,7 +39,7 @@ type TargetImageConfig struct { ImageTags map[string]string `mapstructure:"image_tags" required:"false"` // Same as [`image_tags`](#image_tags) but defined as a singular repeatable // 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. ImageTag config.NameValues `mapstructure:"image_tag" required:"false"` } diff --git a/command/hcl2_upgrade.go b/command/hcl2_upgrade.go index 595a7f0df..ff946a849 100644 --- a/command/hcl2_upgrade.go +++ b/command/hcl2_upgrade.go @@ -72,23 +72,23 @@ const ( # 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 # 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 = ` -# 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 = ` # 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 # 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 = ` # a build block invokes sources and runs provisioning steps on them. The # 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 { ` ) @@ -343,44 +343,44 @@ func transposeTemplatingCalls(s []byte) []byte { return "", UnhandleableArgumentError{ "lower", "`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) { return "", UnhandleableArgumentError{ "upper", "`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) { return "", UnhandleableArgumentError{ "split", "`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) { return "", UnhandleableArgumentError{ "replace", "`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) { return "", UnhandleableArgumentError{ "replace_all", "`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) { return "", UnhandleableArgumentError{ "clean_resource_name", "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://www.packer.io/docs/from-1.5/functions/string/replace" + - " or https://www.packer.io/docs/from-1.5/functions/string/regex_replace", + "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", } }, "build_name": func() string { diff --git a/command/test-fixtures/hcl2_upgrade_basic/expected.pkr.hcl b/command/test-fixtures/hcl2_upgrade_basic/expected.pkr.hcl index e36324971..fbb560ee8 100644 --- a/command/test-fixtures/hcl2_upgrade_basic/expected.pkr.hcl +++ b/command/test-fixtures/hcl2_upgrade_basic/expected.pkr.hcl @@ -11,7 +11,7 @@ # and HCL2 calls (for example '${ var.string_value_example }' ). They won't be # 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 { required_version = ">= 1.6.0" } @@ -19,7 +19,7 @@ packer { # 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 # 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" { type = string default = "" @@ -53,7 +53,7 @@ locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } # 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 # 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" { access_key = "${var.aws_access_key}" ami_description = "Ubuntu 16.04 LTS - expand root partition" @@ -92,7 +92,7 @@ source "amazon-ebs" "autogenerated_1" { # a build block invokes sources and runs provisioning steps on them. The # 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 { sources = ["source.amazon-ebs.autogenerated_1"] @@ -105,7 +105,7 @@ build { # template: hcl2_upgrade:2:38: executing "hcl2_upgrade" at : error calling clean_resource_name: unhandled "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)` - # 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" { inline = ["echo mybuild-{{isotime | clean_resource_name}}"] } @@ -113,7 +113,7 @@ build { # template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at : error calling lower: unhandled "lower" call: # there is no way to automatically upgrade the "lower" call. # 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" { inline = ["echo {{ `SOMETHING` | lower }}"] } @@ -121,7 +121,7 @@ build { # template: hcl2_upgrade:2:35: executing "hcl2_upgrade" at : error calling upper: unhandled "upper" call: # there is no way to automatically upgrade the "upper" call. # 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" { inline = ["echo {{ `something` | upper }}"] } @@ -129,7 +129,7 @@ build { # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at : error calling split: unhandled "split" call: # there is no way to automatically upgrade the "split" call. # 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" { inline = ["echo {{ split `some-string` `-` 0 }}"] } @@ -137,7 +137,7 @@ build { # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at : error calling replace_all: unhandled "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)` - # 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" { inline = ["echo {{ replace_all `-` `/` build_name }}"] } @@ -145,7 +145,7 @@ build { # template: hcl2_upgrade:2:21: executing "hcl2_upgrade" at : error calling replace: unhandled "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)` - # 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" { inline = ["echo {{ replace `some-string` `-` `/` 1 }}"] } diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index ede4a014c..08dd47393 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -156,7 +156,7 @@ func (v *Variable) Value() (cty.Value, hcl.Diagnostics) { Severity: hcl.DiagError, Summary: fmt.Sprintf("Unset variable %q", v.Name), 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.", Context: v.Range.Ptr(), }} diff --git a/hcl2template/version.go b/hcl2template/version.go index 1b2514533..1fb6193b4 100644 --- a/hcl2template/version.go +++ b/hcl2template/version.go @@ -59,7 +59,7 @@ func decodeVersionConstraint(attr *hcl.Attribute) (VersionConstraint, hcl.Diagno diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, 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(), }) return ret, diags diff --git a/website/content/docs/builders/amazon/chroot.mdx b/website/content/docs/builders/amazon/chroot.mdx index c5aca27ff..36ff56e24 100644 --- a/website/content/docs/builders/amazon/chroot.mdx +++ b/website/content/docs/builders/amazon/chroot.mdx @@ -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 // 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. // export PKR_VAR_aws_access_key=$YOURKEY @@ -514,7 +514,7 @@ variables are available: ## 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: diff --git a/website/content/docs/builders/amazon/ebs.mdx b/website/content/docs/builders/amazon/ebs.mdx index c0f018f75..46178f3f3 100644 --- a/website/content/docs/builders/amazon/ebs.mdx +++ b/website/content/docs/builders/amazon/ebs.mdx @@ -158,7 +158,7 @@ run: // set the environment variables to have the same name as the declared // 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. // export PKR_VAR_aws_access_key=$YOURKEY @@ -323,7 +323,7 @@ variables are available: ## 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: diff --git a/website/content/docs/builders/amazon/ebssurrogate.mdx b/website/content/docs/builders/amazon/ebssurrogate.mdx index 3f555396e..e8dd005b6 100644 --- a/website/content/docs/builders/amazon/ebssurrogate.mdx +++ b/website/content/docs/builders/amazon/ebssurrogate.mdx @@ -227,7 +227,7 @@ variables are available: ## 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: diff --git a/website/content/docs/builders/amazon/ebsvolume.mdx b/website/content/docs/builders/amazon/ebsvolume.mdx index 158649e3c..45ac05dae 100644 --- a/website/content/docs/builders/amazon/ebsvolume.mdx +++ b/website/content/docs/builders/amazon/ebsvolume.mdx @@ -258,7 +258,7 @@ variables are available: ## 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: @@ -281,7 +281,7 @@ marked for deletion on termination will remain in your account. ## 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: diff --git a/website/content/docs/builders/amazon/instance.mdx b/website/content/docs/builders/amazon/instance.mdx index 1474a4f59..65f851b13 100644 --- a/website/content/docs/builders/amazon/instance.mdx +++ b/website/content/docs/builders/amazon/instance.mdx @@ -220,7 +220,7 @@ variables are available: ## 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: diff --git a/website/content/docs/builders/docker.mdx b/website/content/docs/builders/docker.mdx index 8b528e08a..65a599ada 100644 --- a/website/content/docs/builders/docker.mdx +++ b/website/content/docs/builders/docker.mdx @@ -217,7 +217,7 @@ You must specify (only) one of `commit`, `discard`, or `export_path`. ## Build Shared Information Variables This build shares generated data with provisioners and post-processors via [template engines](/docs/templates/engine) -for JSON and [contextual variables](/docs/from-1.5/contextual-variables) for HCL2. +for JSON and [contextual variables](//docs/templates/hcl_templates/contextual-variables) for HCL2. The generated variable available for this builder is: diff --git a/website/content/docs/builders/yandex.mdx b/website/content/docs/builders/yandex.mdx index f023cdc82..cefaee004 100644 --- a/website/content/docs/builders/yandex.mdx +++ b/website/content/docs/builders/yandex.mdx @@ -132,7 +132,7 @@ In configuration directives the following variables are available: ## 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) +[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 see above diff --git a/website/content/docs/commands/console.mdx b/website/content/docs/commands/console.mdx index 4462f52bf..e91ce4d85 100644 --- a/website/content/docs/commands/console.mdx +++ b/website/content/docs/commands/console.mdx @@ -117,7 +117,7 @@ $ echo {{timestamp}} | packer console templating ( or `{{..}}` calls ) will not work in HCL2 mode. Without a config file, `packer console` can be used to experiment with the -expression syntax and [built-in functions](/docs/from-1.5/functions). +expression syntax and [built-in functions](//docs/templates/hcl_templates/functions). ### Starting diff --git a/website/content/docs/commands/hcl2_upgrade.mdx b/website/content/docs/commands/hcl2_upgrade.mdx index 0de5d4e85..441da0360 100644 --- a/website/content/docs/commands/hcl2_upgrade.mdx +++ b/website/content/docs/commands/hcl2_upgrade.mdx @@ -59,7 +59,7 @@ here is the list of calls that should get transformed: - `` {{ user `my_var` }} `` becomes `${var.my_var}`. - `` {{ env `my_var` }} `` becomes `${var.my_var}`. Packer HCL2 supports environment variables through input variables. See - [docs](http://packer.io/docs/from-1.5/variables#environment-variables) + [docs](http://packer.io//docs/templates/hcl_templates/variables#environment-variables) for more info. - `{{ timestamp }}` becomes `${local.timestamp}`, the local variable will be created for all generated files. diff --git a/website/content/docs/extending/custom-builders.mdx b/website/content/docs/extending/custom-builders.mdx index c8999e9bd..fe3da2550 100644 --- a/website/content/docs/extending/custom-builders.mdx +++ b/website/content/docs/extending/custom-builders.mdx @@ -205,7 +205,7 @@ provide to procisioners (see below for more details on generatedData.) Packer makes it possible to provide custom template engine variables to be shared with provisioners and post-processors using the `build` function. Json template `build` docs are [here](https://www.packer.io/docs/templates/engine#build) -and HCL template build docs are [here](https://www.packer.io/docs/from-1.5/contextual-variables#build-variables). +and HCL template build docs are [here](https://www.packer.io//docs/templates/hcl_templates/contextual-variables#build-variables). As of Packer v1.5.0, builder Prepare() methods return a list of custom variables which we call `generated data`. We use that list of variables to generate a diff --git a/website/content/docs/post-processors/vagrant.mdx b/website/content/docs/post-processors/vagrant.mdx index 3811be8eb..375b854e1 100644 --- a/website/content/docs/post-processors/vagrant.mdx +++ b/website/content/docs/post-processors/vagrant.mdx @@ -102,7 +102,7 @@ more details about certain options in following sections. - `vagrantfile_template` (string) - Path to a template to use for the Vagrantfile that is packaged with the box. This option supports the usage of the [template engine](/docs/templates/engine) - for JSON and the [contextual variables](/docs/from-1.5/contextual-variables) for HCL2. + for JSON and the [contextual variables](//docs/templates/hcl_templates/contextual-variables) for HCL2. - `vagrantfile_template_generated` (boolean) - By default, Packer will exit with an error if the file specified using the diff --git a/website/content/docs/templates/hcl_templates/blocks/build/index.mdx b/website/content/docs/templates/hcl_templates/blocks/build/index.mdx index 5c8834c56..21daf1d46 100644 --- a/website/content/docs/templates/hcl_templates/blocks/build/index.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/build/index.mdx @@ -16,12 +16,12 @@ To use builders in a `build` block you can either: - Set the `sources` array of string with references to pre-defined sources. -- Define [build-level `source` blocks](/docs/from-1.5/blocks/build/source). +- Define [build-level `source` blocks](//docs/templates/hcl_templates/blocks/build/source). This also allows you to set specific fields. `@include 'from-1.5/builds/example-block.mdx'` -Define [top-level `source` blocks](/docs/from-1.5/blocks/source) to configure +Define [top-level `source` blocks](//docs/templates/hcl_templates/blocks/source) to configure your builders. The list of available builders can be found in the [builders](/docs/builders) section. diff --git a/website/content/docs/templates/hcl_templates/blocks/build/post-processor.mdx b/website/content/docs/templates/hcl_templates/blocks/build/post-processor.mdx index e59f19b03..78b155ca8 100644 --- a/website/content/docs/templates/hcl_templates/blocks/build/post-processor.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/build/post-processor.mdx @@ -32,7 +32,7 @@ can be found in the [post-processors](/docs/post-processors) section. A `post-processor` can also take the `Artifact` from another post-processor when it is defined in a [`post-processors` -block](/docs/from-1.5/blocks/build/post-processor) list, that is a list of +block](//docs/templates/hcl_templates/blocks/build/post-processor) list, that is a list of chained post processors. -> Note: The input 'artifact' received by a post-processor will be automatically @@ -84,11 +84,11 @@ The values within `only` or `except` are _source names_, not builder types. Packer allows to access connection information and basic instance state information from a post-processor. These information are stored in the `build` variable. Check out the [Contextual -Variables](/docs/from-1.5/contextual-variables) documentation to learn more +Variables](//docs/templates/hcl_templates/contextual-variables) documentation to learn more about and see some examples of how to use them. ### Related -- The [`post-processors` block](/docs/from-1.5/blocks/build/post-processor) +- The [`post-processors` block](//docs/templates/hcl_templates/blocks/build/post-processor) allows to define one or more chain of `post-processor`s that will take the output from the build and provision steps. diff --git a/website/content/docs/templates/hcl_templates/blocks/build/post-processors.mdx b/website/content/docs/templates/hcl_templates/blocks/build/post-processors.mdx index ccaa4a40e..a3a9d8e4a 100644 --- a/website/content/docs/templates/hcl_templates/blocks/build/post-processors.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/build/post-processors.mdx @@ -11,7 +11,7 @@ sidebar_title: post-processors `@include 'from-1.5/beta-hcl2-note.mdx'` The `post-processors` block allows to define lists of -[`post-processor`s](/docs/from-1.5/blocks/build/post-processor), that will run +[`post-processor`s](//docs/templates/hcl_templates/blocks/build/post-processor), that will run from the artifact of each build. ```hcl @@ -34,7 +34,7 @@ build { } ``` -The [`post-processor` block](/docs/from-1.5/blocks/build/post-processor) +The [`post-processor` block](//docs/templates/hcl_templates/blocks/build/post-processor) allows to define multiple post-processors that will run from the `Artifact` of each build. Read the `post-processor` documentation to know how to use a post-processor. diff --git a/website/content/docs/templates/hcl_templates/blocks/build/provisioner.mdx b/website/content/docs/templates/hcl_templates/blocks/build/provisioner.mdx index d2e0441fa..4e12415dc 100644 --- a/website/content/docs/templates/hcl_templates/blocks/build/provisioner.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/build/provisioner.mdx @@ -161,4 +161,4 @@ Timeout has no effect in debug mode. ## Build Contextual Variables Packer allows to access connection information and basic instance state information from a provisioner. These information are stored in the `build` variable. -Check out the [Contextual Variables](/docs/from-1.5/contextual-variables) documentation to learn more about and see some examples of how to use them. +Check out the [Contextual Variables](//docs/templates/hcl_templates/contextual-variables) documentation to learn more about and see some examples of how to use them. diff --git a/website/content/docs/templates/hcl_templates/blocks/index.mdx b/website/content/docs/templates/hcl_templates/blocks/index.mdx index b49a5457f..012289118 100644 --- a/website/content/docs/templates/hcl_templates/blocks/index.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/index.mdx @@ -44,16 +44,16 @@ list of all of the available built-in HCL2 blocks. `@include 'from-1.5/variables/foo-block.mdx'` -- [Variable block documentation](/docs/from-1.5/blocks/variable). +- [Variable block documentation](//docs/templates/hcl_templates/blocks/variable). `@include 'from-1.5/locals/example-block.mdx'` -- [Locals block documentation](/docs/from-1.5/blocks/locals). +- [Locals block documentation](//docs/templates/hcl_templates/blocks/locals). `@include 'from-1.5/sources/example-block.mdx'` -- [source block documentation](/docs/from-1.5/blocks/source). +- [source block documentation](//docs/templates/hcl_templates/blocks/source). `@include 'from-1.5/builds/example-block.mdx'` -- [build block documentation](/docs/from-1.5/blocks/build). +- [build block documentation](//docs/templates/hcl_templates/blocks/build). diff --git a/website/content/docs/templates/hcl_templates/blocks/locals.mdx b/website/content/docs/templates/hcl_templates/blocks/locals.mdx index 427f681e2..395654c66 100644 --- a/website/content/docs/templates/hcl_templates/blocks/locals.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/locals.mdx @@ -17,6 +17,6 @@ your Packer configuration. # More on variables -- Read the [full locals](/docs/from-1.5/locals) description for a more +- Read the [full locals](//docs/templates/hcl_templates/locals) description for a more thorough read. - Read the [variables guide](/guides/hcl/variables) for more examples. diff --git a/website/content/docs/templates/hcl_templates/blocks/packer.mdx b/website/content/docs/templates/hcl_templates/blocks/packer.mdx index 41dedd227..f025a5b53 100644 --- a/website/content/docs/templates/hcl_templates/blocks/packer.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/packer.mdx @@ -62,7 +62,7 @@ other dependency management systems like Bundler and NPM. required_version = ">= 1.2.0, < 2.0.0" ``` -A version constraint is a [string literal](/docs/from-1.5/expressions#string-literals) +A version constraint is a [string literal](//docs/templates/hcl_templates/expressions#string-literals) containing one or more conditions, which are separated by commas. Each condition consists of an operator and a version number. diff --git a/website/content/docs/templates/hcl_templates/blocks/source.mdx b/website/content/docs/templates/hcl_templates/blocks/source.mdx index f9bb2358b..b5bb4d7d8 100644 --- a/website/content/docs/templates/hcl_templates/blocks/source.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/source.mdx @@ -14,7 +14,7 @@ The top-level `source` block defines reusable builder configuration blocks: `@include 'from-1.5/sources/example-block.mdx'` You can start builders by refering to those source blocks form a [`build` -block](/docs/from-1.5/blocks/build), for example : +block](//docs/templates/hcl_templates/blocks/build), for example : ```hcl build { @@ -26,7 +26,7 @@ build { } ``` -The build-level [`source` block](/docs/from-1.5/blocks/build/source) allows to +The build-level [`source` block](//docs/templates/hcl_templates/blocks/build/source) allows to set specific source fields. ```hcl diff --git a/website/content/docs/templates/hcl_templates/blocks/variable.mdx b/website/content/docs/templates/hcl_templates/blocks/variable.mdx index b1d466246..a53e9aec3 100644 --- a/website/content/docs/templates/hcl_templates/blocks/variable.mdx +++ b/website/content/docs/templates/hcl_templates/blocks/variable.mdx @@ -12,7 +12,7 @@ sidebar_title: variable The `variable` block, also called the `input-variable` block, defines variables within your Packer configuration. An input-variable cannot be used in another -input variable: we recommend using [locals](/docs/from-1.5/blocks/locals) for that instead. +input variable: we recommend using [locals](//docs/templates/hcl_templates/blocks/locals) for that instead. `@include 'from-1.5/variables/foo-block.mdx'` diff --git a/website/content/docs/templates/hcl_templates/contextual-variables.mdx b/website/content/docs/templates/hcl_templates/contextual-variables.mdx index ac9a1f7b3..81053cf11 100644 --- a/website/content/docs/templates/hcl_templates/contextual-variables.mdx +++ b/website/content/docs/templates/hcl_templates/contextual-variables.mdx @@ -67,8 +67,8 @@ Here is the list of available build variables: For backwards compatibility, `WinRMPassword` is also available through this engine, though it is no different than using the more general `Password`. -All build variables are valid to use with any of the [HCL2 functions](/docs/from-1.5/functions). -Example of using [upper](/docs/from-1.5/functions/string/upper) to upper case the build ID: +All build variables are valid to use with any of the [HCL2 functions](//docs/templates/hcl_templates/functions). +Example of using [upper](//docs/templates/hcl_templates/functions/string/upper) to upper case the build ID: ```hcl post-processor "shell-local" { diff --git a/website/content/docs/templates/hcl_templates/expressions.mdx b/website/content/docs/templates/hcl_templates/expressions.mdx index 2df520326..3d24442d1 100644 --- a/website/content/docs/templates/hcl_templates/expressions.mdx +++ b/website/content/docs/templates/hcl_templates/expressions.mdx @@ -124,7 +124,7 @@ types described above: Key/value pairs can be separated by either a comma or a line break. Values can be arbitrary expressions. Keys are strings; they can be left unquoted if - they are a valid [identifier](/docs/from-1.5/syntax#identifiers), but must be quoted + they are a valid [identifier](//docs/templates/hcl_templates/syntax#identifiers), but must be quoted otherwise. You can use a non-literal expression as a key by wrapping it in parentheses, like `(var.business_unit_tag_name) = "SRE"`. @@ -135,13 +135,13 @@ Packer makes one named values available. The following named values are available: - `source..` is an object representing a - [source](/docs/from-1.5/blocks/source) of the given type + [source](//docs/templates/hcl_templates/blocks/source) of the given type and name. ### Available Functions For a full list of available functions, see [the function -reference](/docs/configuration/from-1.5/functions). +reference](/docs/templates/hcl_templates/functions). ## `for` Expressions @@ -336,8 +336,8 @@ block. If you need to declare resource instances based on a nested data structure or combinations of elements from multiple data structures you can use expressions and functions to derive a suitable value. For some common examples of such situations, see the -[`flatten`](/docs/configuration/from-1.5/functions/collection/flatten) and -[`setproduct`](/docs/configuration/from-1.5/functions/collection/setproduct) +[`flatten`](/docs/templates/hcl_templates/functions/collection/flatten) and +[`setproduct`](/docs/templates/hcl_templates/functions/collection/setproduct) functions. ### Best Practices for `dynamic` Blocks diff --git a/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx b/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx index 09ddfcb94..7f199e7e5 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx @@ -32,5 +32,5 @@ b ## Related Functions -- [`coalescelist`](/docs/from-1.5/functions/collection/coalescelist) performs a similar operation with +- [`coalescelist`](//docs/templates/hcl_templates/functions/collection/coalescelist) performs a similar operation with list arguments rather than individual arguments. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx b/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx index 29322735c..a24e2bd35 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx @@ -39,5 +39,5 @@ symbol to expand the outer list as arguments: ## Related Functions -- [`coalesce`](/docs/from-1.5/functions/collection/coalesce) performs a similar operation with string +- [`coalesce`](//docs/templates/hcl_templates/functions/collection/coalesce) performs a similar operation with string arguments rather than list arguments. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/element.mdx b/website/content/docs/templates/hcl_templates/functions/collection/element.mdx index ee9c463b2..5d0e180d5 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/element.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/element.mdx @@ -35,5 +35,5 @@ a ## Related Functions -- [`index`](/docs/from-1.5/functions/collection/index-fn) finds the index for a particular element value. -- [`lookup`](/docs/from-1.5/functions/collection/lookup) retrieves a value from a _map_ given its _key_. +- [`index`](//docs/templates/hcl_templates/functions/collection/index-fn) finds the index for a particular element value. +- [`lookup`](//docs/templates/hcl_templates/functions/collection/lookup) retrieves a value from a _map_ given its _key_. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx b/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx index c917cf239..19d276f54 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx @@ -31,7 +31,7 @@ Indirectly-nested lists, such as those in maps, are _not_ flattened. The [resource `for_each`](https://www.terraform.io/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings) and -[`dynamic` block](/docs/from-1.5/expressions#dynamic-blocks) +[`dynamic` block](//docs/templates/hcl_templates/expressions#dynamic-blocks) language features both require a collection value that has one element for each repetition. @@ -104,6 +104,6 @@ the associations between the subnets and their containing networks. ## Related Functions -- [`setproduct`](/docs/from-1.5/functions/collection/setproduct) finds all of the combinations of multiple +- [`setproduct`](//docs/templates/hcl_templates/functions/collection/setproduct) finds all of the combinations of multiple lists or sets of values, which can also be useful when preparing collections for use with `for_each` constructs. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx b/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx index c57c3dcac..0a924cd9e 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx @@ -24,5 +24,5 @@ value is not present in the list. ## Related Functions -- [`element`](/docs/from-1.5/functions/collection/element) retrieves a particular element from a list given +- [`element`](//docs/templates/hcl_templates/functions/collection/element) retrieves a particular element from a list given its index. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx b/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx index 2929c2ac5..2cc49795d 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx @@ -24,4 +24,4 @@ be identical as long as the keys in the map don't change. ## Related Functions -- [`values`](/docs/from-1.5/functions/collection/values) returns a list of the _values_ from a map. +- [`values`](//docs/templates/hcl_templates/functions/collection/values) returns a list of the _values_ from a map. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx index 3edd9a77e..cbc4c4ec1 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx @@ -28,4 +28,4 @@ what? ## Related Functions -- [`element`](/docs/from-1.5/functions/collection/element) retrieves a value from a _list_ given its _index_. +- [`element`](//docs/templates/hcl_templates/functions/collection/element) retrieves a value from a _list_ given its _index_. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx b/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx index 66a9c4d5a..c80de8abb 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx @@ -22,4 +22,4 @@ with all of the same elements as the given sequence but in reverse order. ## Related Functions -- [`strrev`](/docs/from-1.5/functions/string/strrev) reverses a string. +- [`strrev`](//docs/templates/hcl_templates/functions/string/strrev) reverses a string. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx index a744c1a85..cd518d6ef 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx @@ -31,9 +31,9 @@ the ordering of the given elements is not preserved. ## Related Functions -- [`contains`](/docs/from-1.5/functions/collection/contains) tests whether a given list or set contains +- [`contains`](//docs/templates/hcl_templates/functions/collection/contains) tests whether a given list or set contains a given element value. -- [`setproduct`](/docs/from-1.5/functions/collection/setproduct) computes the _Cartesian product_ of multiple +- [`setproduct`](//docs/templates/hcl_templates/functions/collection/setproduct) computes the _Cartesian product_ of multiple sets. -- [`setunion`](/docs/from-1.5/functions/collection/setunion) computes the _union_ of +- [`setunion`](//docs/templates/hcl_templates/functions/collection/setunion) computes the _union_ of multiple sets. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx index aaaef049c..2e4e71bbc 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx @@ -118,7 +118,7 @@ elements all have a consistent type: The [resource `for_each`](https://www.terraform.io/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings) and -[`dynamic` block](/docs/from-1.5/expressions/#dynamic-blocks) +[`dynamic` block](//docs/templates/hcl_templates/expressions/#dynamic-blocks) language features both require a collection value that has one element for each repetition. @@ -212,12 +212,12 @@ elements in the input variables. ## Related Functions -- [`contains`](/docs/from-1.5/functions/collection/contains) tests whether a given list or set contains +- [`contains`](//docs/templates/hcl_templates/functions/collection/contains) tests whether a given list or set contains a given element value. -- [`flatten`](/docs/from-1.5/functions/collection/flatten) is useful for flattening heirarchical data +- [`flatten`](//docs/templates/hcl_templates/functions/collection/flatten) is useful for flattening heirarchical data into a single list, for situations where the relationships between two object types are defined explicitly. -- [`setintersection`](/docs/from-1.5/functions/collection/setintersection) computes the _intersection_ of +- [`setintersection`](//docs/templates/hcl_templates/functions/collection/setintersection) computes the _intersection_ of multiple sets. -- [`setunion`](/docs/from-1.5/functions/collection/setunion) computes the _union_ of multiple +- [`setunion`](//docs/templates/hcl_templates/functions/collection/setunion) computes the _union_ of multiple sets. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx index 1080c34d2..18ea3f8c5 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx @@ -34,9 +34,9 @@ the ordering of the given elements is not preserved. ## Related Functions -- [`contains`](/docs/from-1.5/functions/collection/contains) tests whether a given list or set contains +- [`contains`](//docs/templates/hcl_templates/functions/collection/contains) tests whether a given list or set contains a given element value. -- [`setintersection`](/docs/from-1.5/functions/collection/setintersection) computes the _intersection_ of +- [`setintersection`](//docs/templates/hcl_templates/functions/collection/setintersection) computes the _intersection_ of multiple sets. -- [`setproduct`](/docs/from-1.5/functions/collection/setproduct) computes the _Cartesian product_ of multiple +- [`setproduct`](//docs/templates/hcl_templates/functions/collection/setproduct) computes the _Cartesian product_ of multiple sets. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx b/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx index 3b9dbf873..58ed4f266 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx @@ -28,5 +28,5 @@ list. ## Related Functions -- [`substr`](/docs/from-1.5/functions/string/substr) performs a similar function for characters in a +- [`substr`](//docs/templates/hcl_templates/functions/string/substr) performs a similar function for characters in a string, although it uses a length instead of an end index. diff --git a/website/content/docs/templates/hcl_templates/functions/collection/values.mdx b/website/content/docs/templates/hcl_templates/functions/collection/values.mdx index 17221b555..c7a14220e 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/values.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/values.mdx @@ -11,7 +11,7 @@ in that map. The values are returned in lexicographical order by their corresponding _keys_, so the values will be returned in the same order as their keys would be -returned from [`keys`](/docs/from-1.5/functions/collection/keys). +returned from [`keys`](//docs/templates/hcl_templates/functions/collection/keys). ## Examples @@ -26,4 +26,4 @@ returned from [`keys`](/docs/from-1.5/functions/collection/keys). ## Related Functions -- [`keys`](/docs/from-1.5/functions/collection/keys) returns a list of the _keys_ from a map. +- [`keys`](//docs/templates/hcl_templates/functions/collection/keys) returns a list of the _keys_ from a map. diff --git a/website/content/docs/templates/hcl_templates/functions/contextual/env.mdx b/website/content/docs/templates/hcl_templates/functions/contextual/env.mdx index 43eecc5e1..7e504da85 100644 --- a/website/content/docs/templates/hcl_templates/functions/contextual/env.mdx +++ b/website/content/docs/templates/hcl_templates/functions/contextual/env.mdx @@ -19,7 +19,7 @@ other places. In the previous example, the value of `aws_region` will be what's stored in the `AWS_DEFAULT_REGION` env var, unless aws_region is also set in a [manner that takes -precedence](/docs/from-1.5/variables#variable-definition-precedence). +precedence](//docs/templates/hcl_templates/variables#variable-definition-precedence). -> **Why can't I use environment variables elsewhere?** User variables are the single source of configurable input. We felt that having environment variables @@ -31,7 +31,7 @@ template that a user can easily discover using `packer inspect`. When the environment variable is not set at all -- not even with the empty string -- the value returned by `env` will be an an empty string. It will still be possible to set it using other means but you could use [custom validation -rules](/docs/from-1.5/variables#custom-validation-rules) to error in that case +rules](//docs/templates/hcl_templates/variables#custom-validation-rules) to error in that case to make sure it is set, for example: ```hcl diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx index 0e08b60af..347f2238f 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx @@ -13,7 +13,7 @@ whether the expression produced a result without any errors. This is a special function that is able to catch errors produced when evaluating its argument. For most situations where you could use `can` it's better to use -[`try`](/docs/from-1.5/functions/conversion/try) instead, because it allows for more concise definition of +[`try`](//docs/templates/hcl_templates/functions/conversion/try) instead, because it allows for more concise definition of fallback values for failing expressions. The `can` function can only catch and handle _dynamic_ errors resulting from @@ -25,7 +25,7 @@ as a malformed resource reference. variable validation rules. Although it can technically accept any sort of expression and be used elsewhere in the configuration, we recommend against using it in other contexts. For error handling elsewhere in the configuration, -prefer to use [`try`](/docs/from-1.5/functions/conversion/try). +prefer to use [`try`](//docs/templates/hcl_templates/functions/conversion/try). ## Examples @@ -54,5 +54,5 @@ A local value with the name "nonexist" has not been declared. ## Related Functions -- [`try`](/docs/from-1.5/functions/conversion/try), which tries evaluating a sequence of expressions and +- [`try`](//docs/templates/hcl_templates/functions/conversion/try), which tries evaluating a sequence of expressions and returns the result of the first one that succeeds. diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx index 61c7f722e..89f52b8bc 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx @@ -108,5 +108,5 @@ A local value with the name "nonexist" has not been declared. ## Related Functions -- [`can`](/docs/from-1.5/functions/conversion/can), which tries evaluating an expression and returns a +- [`can`](//docs/templates/hcl_templates/functions/conversion/can), which tries evaluating an expression and returns a boolean value indicating whether it succeeded. diff --git a/website/content/docs/templates/hcl_templates/functions/datetime/formatdate.mdx b/website/content/docs/templates/hcl_templates/functions/datetime/formatdate.mdx index e2563d5c7..e230d0ba4 100644 --- a/website/content/docs/templates/hcl_templates/functions/datetime/formatdate.mdx +++ b/website/content/docs/templates/hcl_templates/functions/datetime/formatdate.mdx @@ -100,7 +100,7 @@ configuration as needed: ## Related Functions -- [`format`](/docs/from-1.5/functions/string/format) is a more general formatting function for arbitrary +- [`format`](//docs/templates/hcl_templates/functions/string/format) is a more general formatting function for arbitrary data. -- [`timestamp`](/docs/from-1.5/functions/datetime/timestamp) returns the current date and time in a format +- [`timestamp`](//docs/templates/hcl_templates/functions/datetime/timestamp) returns the current date and time in a format suitable for input to `formatdate`. diff --git a/website/content/docs/templates/hcl_templates/functions/datetime/timeadd.mdx b/website/content/docs/templates/hcl_templates/functions/datetime/timeadd.mdx index 49b42a0e7..e47bc465e 100644 --- a/website/content/docs/templates/hcl_templates/functions/datetime/timeadd.mdx +++ b/website/content/docs/templates/hcl_templates/functions/datetime/timeadd.mdx @@ -30,7 +30,7 @@ of adding the given direction to the given timestamp. -> **Breaking change note:** Packer previously let you decide your own "Date and Time format" syntax. With HCL2 and for parity with Terraform, Packer will be using the [RFC 3339](https://tools.ietf.org/html/rfc3339) "Date and Time -format" syntax. As a string. [`formatdate`](/docs/from-1.5/functions/datetime/formatdate) still allows you +format" syntax. As a string. [`formatdate`](//docs/templates/hcl_templates/functions/datetime/formatdate) still allows you to format a date. ## Examples diff --git a/website/content/docs/templates/hcl_templates/functions/datetime/timestamp.mdx b/website/content/docs/templates/hcl_templates/functions/datetime/timestamp.mdx index 620ad8ea0..e953b778b 100644 --- a/website/content/docs/templates/hcl_templates/functions/datetime/timestamp.mdx +++ b/website/content/docs/templates/hcl_templates/functions/datetime/timestamp.mdx @@ -22,7 +22,7 @@ Packer run. -> **Breaking change note:** Packer previously let you decide your own "Date and Time format" syntax. With HCL2 and for parity with Terraform, Packer will be using the [RFC 3339](https://tools.ietf.org/html/rfc3339) "Date and Time -format" syntax. As a string. [`formatdate`](/docs/from-1.5/functions/datetime/formatdate) still allows you +format" syntax. As a string. [`formatdate`](//docs/templates/hcl_templates/functions/datetime/formatdate) still allows you to format a date. ## Examples @@ -34,5 +34,5 @@ to format a date. ## Related Functions -- [`formatdate`](/docs/from-1.5/functions/datetime/formatdate) can convert the resulting timestamp to +- [`formatdate`](//docs/templates/hcl_templates/functions/datetime/formatdate) can convert the resulting timestamp to other date and time formats. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx index 05272ee34..222311ae5 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx @@ -33,5 +33,5 @@ Hello World ## Related Functions -- [`base64encode`](/docs/from-1.5/functions/encoding/base64encode) performs the opposite operation, +- [`base64encode`](//docs/templates/hcl_templates/functions/encoding/base64encode) performs the opposite operation, encoding the UTF-8 bytes for a string as Base64. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx index ee49a3ad4..5dca818e5 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx @@ -34,5 +34,5 @@ SGVsbG8gV29ybGQ= ## Related Functions -- [`base64decode`](/docs/from-1.5/functions/encoding/base64decode) performs the opposite operation, +- [`base64decode`](//docs/templates/hcl_templates/functions/encoding/base64decode) performs the opposite operation, decoding Base64 data and interpreting it as a UTF-8 string. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx index 2cce23151..f3227aa8c 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx @@ -14,7 +14,7 @@ of the result of decoding that string. The JSON encoding is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159). This function maps JSON values to -[Packer language values](/docs/from-1.5/expressions#types-and-values) +[Packer language values](//docs/templates/hcl_templates/expressions#types-and-values) in the following way: | JSON type | Packer type | @@ -43,5 +43,5 @@ true ## Related Functions -- [`jsonencode`](/docs/from-1.5/functions/encoding/jsonencode) performs the opposite operation, _encoding_ +- [`jsonencode`](//docs/templates/hcl_templates/functions/encoding/jsonencode) performs the opposite operation, _encoding_ a value as JSON. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx index 56a92a550..0819f897a 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx @@ -11,7 +11,7 @@ description: The jsonencode function encodes a given value as a JSON string. The JSON encoding is defined in [RFC 7159](https://tools.ietf.org/html/rfc7159). This function maps -[Packer language values](/docs/from-1.5/expressions#types-and-values) +[Packer language values](//docs/templates/hcl_templates/expressions#types-and-values) to JSON values in the following way: | Packer type | JSON type | @@ -40,5 +40,5 @@ rarely a problem in practice. ## Related Functions -- [`jsondecode`](/docs/from-1.5/functions/encoding/jsondecode) performs the opposite operation, _decoding_ +- [`jsondecode`](//docs/templates/hcl_templates/functions/encoding/jsondecode) performs the opposite operation, _decoding_ a JSON string to obtain its represented value. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx index b6e9f275f..d30109321 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx @@ -15,7 +15,7 @@ This function supports a subset of [YAML 1.2](https://yaml.org/spec/1.2/spec.htm as described below. This function maps YAML values to -[Packer language values](/docs/from-1.5/expressions#types-and-values) +[Packer language values](//docs/templates/hcl_templates/expressions#types-and-values) in the following way: | YAML type | Packer type | @@ -94,7 +94,7 @@ Call to function "yamldecode" failed: unsupported tag "!not-supported". ## Related Functions -- [`jsondecode`](/docs/from-1.5/functions/encoding/jsondecode) is a similar operation using JSON instead +- [`jsondecode`](//docs/templates/hcl_templates/functions/encoding/jsondecode) is a similar operation using JSON instead of YAML. -- [`yamlencode`](/docs/from-1.5/functions/encoding/yamlencode) performs the opposite operation, _encoding_ +- [`yamlencode`](//docs/templates/hcl_templates/functions/encoding/yamlencode) performs the opposite operation, _encoding_ a value as YAML. diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx index 8be8b5959..ef0602a60 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx @@ -13,7 +13,7 @@ description: The yamlencode function encodes a given value as a YAML string. result format may change in future versions of Packer, based on feedback. Do not use `yamldecode` to construct a value for any resource argument where changes to the result would be disruptive. To get a consistent string -representation of a value use [`jsonencode`](/docs/from-1.5/functions/encoding/jsonencode) instead; its +representation of a value use [`jsonencode`](//docs/templates/hcl_templates/functions/encoding/jsonencode) instead; its results are also valid YAML because YAML is a JSON superset. This function maps -[Packer language values](/docs/from-1.5/expressions#types-and-values) +[Packer language values](//docs/templates/hcl_templates/expressions#types-and-values) to YAML tags in the following way: | Packer type | YAML type | @@ -75,12 +75,12 @@ mean that this is rarely a problem in practice. `yamlencode` always uses YAML's "block style" for mappings and sequences, unless the mapping or sequence is empty. To generate flow-style YAML, use -[`jsonencode`](/docs/from-1.5/functions/encoding/jsonencode) instead: YAML flow-style is a superset +[`jsonencode`](//docs/templates/hcl_templates/functions/encoding/jsonencode) instead: YAML flow-style is a superset of JSON syntax. ## Related Functions -- [`jsonencode`](/docs/from-1.5/functions/encoding/jsonencode) is a similar operation using JSON instead +- [`jsonencode`](//docs/templates/hcl_templates/functions/encoding/jsonencode) is a similar operation using JSON instead of YAML. -- [`yamldecode`](/docs/from-1.5/functions/encoding/yamldecode) performs the opposite operation, _decoding_ +- [`yamldecode`](//docs/templates/hcl_templates/functions/encoding/yamldecode) performs the opposite operation, _decoding_ a YAML string to obtain its represented value. diff --git a/website/content/docs/templates/hcl_templates/functions/file/abspath.mdx b/website/content/docs/templates/hcl_templates/functions/file/abspath.mdx index dd60dceb7..5c6322a95 100644 --- a/website/content/docs/templates/hcl_templates/functions/file/abspath.mdx +++ b/website/content/docs/templates/hcl_templates/functions/file/abspath.mdx @@ -14,7 +14,7 @@ Referring directly to filesystem paths in resource arguments may cause spurious diffs if the same configuration is applied from multiple systems or on different host operating systems. We recommend using filesystem paths only for transient values, such as the argument to -[`file`](/docs/from-1.5/functions/file) (where only the contents are then +[`file`](//docs/templates/hcl_templates/functions/file) (where only the contents are then stored). ## Examples diff --git a/website/content/docs/templates/hcl_templates/functions/file/basename.mdx b/website/content/docs/templates/hcl_templates/functions/file/basename.mdx index 20d3cdddf..d39058971 100644 --- a/website/content/docs/templates/hcl_templates/functions/file/basename.mdx +++ b/website/content/docs/templates/hcl_templates/functions/file/basename.mdx @@ -25,7 +25,7 @@ it uses backslash `\` as the path segment separator. On Unix systems, the slash Referring directly to filesystem paths in resource arguments may cause spurious diffs if the same configuration is applied from multiple systems or on different host operating systems. We recommend using filesystem paths only -for transient values, such as the argument to [`file`](/docs/from-1.5/functions/file) (where +for transient values, such as the argument to [`file`](//docs/templates/hcl_templates/functions/file) (where only the contents are then stored) or in `connection` and `provisioner` blocks. ## Examples @@ -37,6 +37,6 @@ baz.txt ## Related Functions -- [`dirname`](/docs/from-1.5/functions/file/dirname) returns all of the segments of a filesystem path +- [`dirname`](//docs/templates/hcl_templates/functions/file/dirname) returns all of the segments of a filesystem path _except_ the last, discarding the portion that would be returned by `basename`. diff --git a/website/content/docs/templates/hcl_templates/functions/file/dirname.mdx b/website/content/docs/templates/hcl_templates/functions/file/dirname.mdx index 8f067be5f..c5f7c542e 100644 --- a/website/content/docs/templates/hcl_templates/functions/file/dirname.mdx +++ b/website/content/docs/templates/hcl_templates/functions/file/dirname.mdx @@ -24,7 +24,7 @@ any slashes in the given path will be replaced by backslashes before returning. Referring directly to filesystem paths in resource arguments may cause spurious diffs if the same configuration is applied from multiple systems or on different host operating systems. We recommend using filesystem paths only -for transient values, such as the argument to [`file`](/docs/from-1.5/functions/file) (where +for transient values, such as the argument to [`file`](//docs/templates/hcl_templates/functions/file) (where only the contents are then stored) or in `connection` and `provisioner` blocks. ## Examples @@ -36,5 +36,5 @@ foo/bar ## Related Functions -- [`basename`](/docs/from-1.5/functions/file/basename) returns _only_ the last portion of a filesystem +- [`basename`](//docs/templates/hcl_templates/functions/file/basename) returns _only_ the last portion of a filesystem path, discarding the portion that would be returned by `dirname`. diff --git a/website/content/docs/templates/hcl_templates/functions/file/file.mdx b/website/content/docs/templates/hcl_templates/functions/file/file.mdx index 3df9374fa..4b595ce5e 100644 --- a/website/content/docs/templates/hcl_templates/functions/file/file.mdx +++ b/website/content/docs/templates/hcl_templates/functions/file/file.mdx @@ -38,5 +38,5 @@ Hello World ## Related Functions -- [`fileexists`](/docs/from-1.5/functions/file/fileexists) determines whether a file exists +- [`fileexists`](//docs/templates/hcl_templates/functions/file/fileexists) determines whether a file exists at a given path. diff --git a/website/content/docs/templates/hcl_templates/functions/file/fileexists.mdx b/website/content/docs/templates/hcl_templates/functions/file/fileexists.mdx index ea3a928ee..de0667f77 100644 --- a/website/content/docs/templates/hcl_templates/functions/file/fileexists.mdx +++ b/website/content/docs/templates/hcl_templates/functions/file/fileexists.mdx @@ -32,4 +32,4 @@ fileexists("custom-section.sh") ? file("custom-section.sh") : local.default_cont ## Related Functions -- [`file`](/docs/from-1.5/functions/file) reads the contents of a file at a given path +- [`file`](//docs/templates/hcl_templates/functions/file) reads the contents of a file at a given path diff --git a/website/content/docs/templates/hcl_templates/functions/index.mdx b/website/content/docs/templates/hcl_templates/functions/index.mdx index d5558f7be..2c6c7f934 100644 --- a/website/content/docs/templates/hcl_templates/functions/index.mdx +++ b/website/content/docs/templates/hcl_templates/functions/index.mdx @@ -20,7 +20,7 @@ max(5, 12, 9) ``` For more details on syntax, see -[_Function Calls_](/docs/from-1.5/expressions#function-calls) +[_Function Calls_](//docs/templates/hcl_templates/expressions#function-calls) on the Expressions page. The HCL language does not support user-defined functions, and so only diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx index e1764e32c..c4b69d288 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx @@ -22,7 +22,7 @@ cidrhost(prefix, hostnum) no more than the number of digits remaining in the address after the given prefix. For more details on how this function interprets CIDR prefixes and populates host numbers, see the worked example for -[`cidrsubnet`](/docs/from-1.5/functions/ipnet/cidrsubnet). +[`cidrsubnet`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnet). Conventionally host number zero is used to represent the address of the network itself and the host number that would fill all the host bits with @@ -46,5 +46,5 @@ fd00:fd12:3456:7890::22 ## Related Functions -- [`cidrsubnet`](/docs/from-1.5/functions/ipnet/cidrsubnet) calculates a subnet address under a given +- [`cidrsubnet`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnet) calculates a subnet address under a given network address prefix. diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx index 428d51679..e1b119b77 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx @@ -28,7 +28,7 @@ additional bits added to the prefix. This function accepts both IPv6 and IPv4 prefixes, and the result always uses the same addressing scheme as the given prefix. -Unlike the related function [`cidrsubnets`](/docs/from-1.5/functions/ipnet/cidrsubnets), `cidrsubnet` +Unlike the related function [`cidrsubnets`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnets), `cidrsubnet` allows you to give a specific network number to use. `cidrsubnets` can allocate multiple network addresses at once, but numbers them automatically starting with zero. @@ -89,7 +89,7 @@ This gives us some additional information but also confirms (using a slightly different notation) the conversion from decimal to binary and shows the range of possible host addresses in this network. -While [`cidrhost`](/docs/from-1.5/functions/ipnet/cidrhost) allows calculating single host IP addresses, +While [`cidrhost`](//docs/templates/hcl_templates/functions/ipnet/cidrhost) allows calculating single host IP addresses, `cidrsubnet` on the other hand creates a new network prefix _within_ the given network prefix. In other words, it creates a subnet. @@ -144,7 +144,7 @@ Hosts/Net: 14 Class A, Private Internet The new subnet has four bits available for host numbering, which means that there are 14 host addresses available for assignment once we subtract the network's own address and the broadcast address. You can thus use -[`cidrhost`](/docs/from-1.5/functions/ipnet/cidrhost) function to calculate those host addresses by +[`cidrhost`](//docs/templates/hcl_templates/functions/ipnet/cidrhost) function to calculate those host addresses by providing it a value between 1 and 14: ```shell-session @@ -159,9 +159,9 @@ For more information on CIDR notation and subnetting, see ## Related Functions -- [`cidrhost`](/docs/from-1.5/functions/ipnet/cidrhost) calculates the IP address for a single host +- [`cidrhost`](//docs/templates/hcl_templates/functions/ipnet/cidrhost) calculates the IP address for a single host within a given network address prefix. -- [`cidrnetmask`](/docs/from-1.5/functions/ipnet/cidrnetmask) converts an IPv4 network prefix in CIDR +- [`cidrnetmask`](//docs/templates/hcl_templates/functions/ipnet/cidrnetmask) converts an IPv4 network prefix in CIDR notation into netmask notation. -- [`cidrsubnets`](/docs/from-1.5/functions/ipnet/cidrsubnets) can allocate multiple consecutive +- [`cidrsubnets`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnets) can allocate multiple consecutive addresses under a prefix at once, numbering them automatically. diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx index 57d757f0d..fff40fcd0 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx @@ -23,7 +23,7 @@ value is therefore a list with one element per `newbits` argument, each a string containing an address range in CIDR notation. For more information on IP addressing concepts, see the documentation for the -related function [`cidrsubnet`](/docs/from-1.5/functions/ipnet/cidrsubnet). `cidrsubnet` calculates +related function [`cidrsubnet`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnet). `cidrsubnet` calculates a single subnet address within a prefix while allowing you to specify its subnet number, while `cidrsubnets` can calculate many at once, potentially of different sizes, and assigns subnet numbers automatically. @@ -58,7 +58,7 @@ the same addressing scheme as the given prefix. ``` You can use nested `cidrsubnets` calls with -[`for` expressions](/docs/from-1.5/expressions#for-expressions) +[`for` expressions](//docs/templates/hcl_templates/expressions#for-expressions) to concisely allocate groups of network address blocks: ```shell-session @@ -85,9 +85,9 @@ to concisely allocate groups of network address blocks: ## Related Functions -- [`cidrhost`](/docs/from-1.5/functions/ipnet/cidrhost) calculates the IP address for a single host +- [`cidrhost`](//docs/templates/hcl_templates/functions/ipnet/cidrhost) calculates the IP address for a single host within a given network address prefix. -- [`cidrnetmask`](/docs/from-1.5/functions/ipnet/cidrnetmask) converts an IPv4 network prefix in CIDR +- [`cidrnetmask`](//docs/templates/hcl_templates/functions/ipnet/cidrnetmask) converts an IPv4 network prefix in CIDR notation into netmask notation. -- [`cidrsubnet`](/docs/from-1.5/functions/ipnet/cidrsubnet) calculates a single subnet address, allowing +- [`cidrsubnet`](//docs/templates/hcl_templates/functions/ipnet/cidrsubnet) calculates a single subnet address, allowing you to specify its network number. diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx index a35345c3a..3f88bc62f 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx @@ -22,5 +22,5 @@ given value, which may be a fraction. ## Related Functions -- [`floor`](/docs/from-1.5/functions/numeric/floor), which rounds to the nearest whole number _less than_ +- [`floor`](//docs/templates/hcl_templates/functions/numeric/floor), which rounds to the nearest whole number _less than_ or equal. diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx index c46fe5643..9157635ee 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx @@ -22,5 +22,5 @@ given value, which may be a fraction. ## Related Functions -- [`ceil`](/docs/from-1.5/functions/numeric/ceil), which rounds to the nearest whole number _greater than_ +- [`ceil`](//docs/templates/hcl_templates/functions/numeric/ceil), which rounds to the nearest whole number _greater than_ or equal. diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx index 6af969230..1aa62c3a0 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx @@ -25,4 +25,4 @@ to individual arguments: ## Related Functions -- [`min`](/docs/from-1.5/functions/numeric/min), which returns the _smallest_ number from a set. +- [`min`](//docs/templates/hcl_templates/functions/numeric/min), which returns the _smallest_ number from a set. diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx index 5489d6b55..4350fb32f 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx @@ -25,4 +25,4 @@ to individual arguments: ## Related Functions -- [`max`](/docs/from-1.5/functions/numeric/max), which returns the _greatest_ number from a set. +- [`max`](//docs/templates/hcl_templates/functions/numeric/max), which returns the _greatest_ number from a set. diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx index 1de74f6a6..f600c910e 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx @@ -47,5 +47,5 @@ Invalid value for "number" parameter: cannot parse "12" as a base 2 integer. ## Related Functions -- [`format`](/docs/from-1.5/functions/string/format) can format numbers and other values into strings, +- [`format`](//docs/templates/hcl_templates/functions/string/format) can format numbers and other values into strings, with optional zero padding, alignment, etc. diff --git a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx index ab594f474..45320d905 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx @@ -24,5 +24,5 @@ hello ## Related Functions -- [`trimspace`](/docs/from-1.5/functions/string/trimspace), which removes all types of whitespace from +- [`trimspace`](//docs/templates/hcl_templates/functions/string/trimspace), which removes all types of whitespace from both the start and the end of a string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/format.mdx b/website/content/docs/templates/hcl_templates/functions/string/format.mdx index d3f3f3432..986a778ce 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/format.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/format.mdx @@ -114,7 +114,7 @@ for an unsupported format verb. ## Related Functions -- [`formatdate`](/docs/from-1.5/functions/datetime/formatdate) is a specialized formatting function for +- [`formatdate`](//docs/templates/hcl_templates/functions/datetime/formatdate) is a specialized formatting function for human-readable timestamps. -- [`formatlist`](/docs/from-1.5/functions/string/formatlist) uses the same specification syntax to +- [`formatlist`](//docs/templates/hcl_templates/functions/string/formatlist) uses the same specification syntax to produce a list of strings. diff --git a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx index 97b3637dd..edb3f6edc 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx @@ -16,7 +16,7 @@ formatlist(spec, values...) ``` The specification string uses -[the same syntax as `format`](/docs/from-1.5/functions/string/format#specification-syntax). +[the same syntax as `format`](//docs/templates/hcl_templates/functions/string/format#specification-syntax). The given values can be a mixture of list and non-list arguments. Any given lists must be the same length, which decides the length of the resulting list. @@ -46,5 +46,5 @@ once per element of the list arguments. ## Related Functions -- [`format`](/docs/from-1.5/functions/string/format) defines the specification syntax used by this +- [`format`](//docs/templates/hcl_templates/functions/string/format) defines the specification syntax used by this function and produces a single string as its result. diff --git a/website/content/docs/templates/hcl_templates/functions/string/join.mdx b/website/content/docs/templates/hcl_templates/functions/string/join.mdx index 4f7580af4..26d8ef8a2 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/join.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/join.mdx @@ -26,5 +26,5 @@ foo ## Related Functions -- [`split`](/docs/from-1.5/functions/string/split) performs the opposite operation: producing a list +- [`split`](//docs/templates/hcl_templates/functions/string/split) performs the opposite operation: producing a list by separating a single string using a given delimiter. diff --git a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx index 5c38cd983..cbf75fd67 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx @@ -23,5 +23,5 @@ This function uses Unicode's definition of letters and of upper- and lowercase. ## Related Functions -- [`upper`](/docs/from-1.5/functions/string/upper) converts letters in a string to _uppercase_. -- [`title`](/docs/from-1.5/functions/string/title) converts the first letter of each word in a string to uppercase. +- [`upper`](//docs/templates/hcl_templates/functions/string/upper) converts letters in a string to _uppercase_. +- [`title`](//docs/templates/hcl_templates/functions/string/title) converts the first letter of each word in a string to uppercase. diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx index 6d022d045..ca54d3bdf 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx @@ -44,5 +44,5 @@ hello everybody ## Related Functions -- [`replace`](/docs/from-1.5/functions/string/replace) searches a given string for another given +- [`replace`](//docs/templates/hcl_templates/functions/string/replace) searches a given string for another given substring, and replaces all occurrences with a given replacement string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx index 55475f0f5..a6f9d5c7b 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx @@ -27,5 +27,5 @@ hello everybody ## Related Functions -- [`regex_replace`](/docs/from-1.5/functions/string/regex_replace) searches a given string for another given substring, +- [`regex_replace`](//docs/templates/hcl_templates/functions/string/regex_replace) searches a given string for another given substring, and replaces each occurrence with a given replacement string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/split.mdx b/website/content/docs/templates/hcl_templates/functions/string/split.mdx index 4257f9fa4..86e8c1cd2 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/split.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/split.mdx @@ -36,5 +36,5 @@ split(separator, string) ## Related Functions -- [`join`](/docs/from-1.5/functions/string/join) performs the opposite operation: producing a string +- [`join`](//docs/templates/hcl_templates/functions/string/join) performs the opposite operation: producing a string joining together a list of strings with a given separator. diff --git a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx index 3a5f9f43e..ce5d1e713 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx @@ -24,4 +24,4 @@ olleh ## Related Functions -- [`reverse`](/docs/from-1.5/functions/collection/reverse) reverses a sequence. +- [`reverse`](//docs/templates/hcl_templates/functions/collection/reverse) reverses a sequence. diff --git a/website/content/docs/templates/hcl_templates/functions/string/title.mdx b/website/content/docs/templates/hcl_templates/functions/string/title.mdx index 1d9f81f93..4b30d7281 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/title.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/title.mdx @@ -21,5 +21,5 @@ This function uses Unicode's definition of letters and of upper- and lowercase. ## Related Functions -- [`upper`](/docs/from-1.5/functions/string/upper) converts _all_ letters in a string to uppercase. -- [`lower`](/docs/from-1.5/functions/string/lower) converts all letters in a string to lowercase. +- [`upper`](//docs/templates/hcl_templates/functions/string/upper) converts _all_ letters in a string to uppercase. +- [`lower`](//docs/templates/hcl_templates/functions/string/lower) converts all letters in a string to lowercase. diff --git a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx index 2f1f473fd..e4505fcc9 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx @@ -20,7 +20,7 @@ hello ## Related Functions -- [`trimprefix`](/docs/from-1.5/functions/string/trimprefix) removes a word from the start of a string. -- [`trimsuffix`](/docs/from-1.5/functions/string/trimsuffix) removes a word from the end of a string. -- [`trimspace`](/docs/from-1.5/functions/string/trimspace) removes all types of whitespace from +- [`trimprefix`](//docs/templates/hcl_templates/functions/string/trimprefix) removes a word from the start of a string. +- [`trimsuffix`](//docs/templates/hcl_templates/functions/string/trimsuffix) removes a word from the end of a string. +- [`trimspace`](//docs/templates/hcl_templates/functions/string/trimspace) removes all types of whitespace from both the start and the end of a string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx index 00dcbddf8..a141f96ab 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx @@ -19,7 +19,7 @@ world ## Related Functions -- [`trim`](/docs/from-1.5/functions/string/trim) removes characters at the start and end of a string. -- [`trimsuffix`](/docs/from-1.5/functions/string/trimsuffix) removes a word from the end of a string. -- [`trimspace`](/docs/from-1.5/functions/string/trimspace) removes all types of whitespace from +- [`trim`](//docs/templates/hcl_templates/functions/string/trim) removes characters at the start and end of a string. +- [`trimsuffix`](//docs/templates/hcl_templates/functions/string/trimsuffix) removes a word from the end of a string. +- [`trimspace`](//docs/templates/hcl_templates/functions/string/trimspace) removes all types of whitespace from both the start and the end of a string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx index e0e2a91b5..4a96adb93 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx @@ -24,5 +24,5 @@ hello ## Related Functions -- [`chomp`](/docs/from-1.5/functions/string/chomp) removes just line ending characters from the _end_ of +- [`chomp`](//docs/templates/hcl_templates/functions/string/chomp) removes just line ending characters from the _end_ of a string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx index 0ea882385..1a7f50bca 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx @@ -19,7 +19,7 @@ hello ## Related Functions -- [`trim`](/docs/from-1.5/functions/string/trim) removes characters at the start and end of a string. -- [`trimprefix`](/docs/from-1.5/functions/string/trimprefix) removes a word from the start of a string. -- [`trimspace`](/docs/from-1.5/functions/string/trimspace) removes all types of whitespace from +- [`trim`](//docs/templates/hcl_templates/functions/string/trim) removes characters at the start and end of a string. +- [`trimprefix`](//docs/templates/hcl_templates/functions/string/trimprefix) removes a word from the start of a string. +- [`trimspace`](//docs/templates/hcl_templates/functions/string/trimspace) removes all types of whitespace from both the start and the end of a string. diff --git a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx index 6145a7db0..4da4737d6 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx @@ -23,5 +23,5 @@ This function uses Unicode's definition of letters and of upper- and lowercase. ## Related Functions -- [`lower`](/docs/from-1.5/functions/string/lower) converts letters in a string to _lowercase_. -- [`title`](/docs/from-1.5/functions/string/title) converts the first letter of each word in a string to uppercase. +- [`lower`](//docs/templates/hcl_templates/functions/string/lower) converts letters in a string to _lowercase_. +- [`title`](//docs/templates/hcl_templates/functions/string/title) converts the first letter of each word in a string to uppercase. diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx index dd9a0400b..4eb92361c 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx @@ -25,4 +25,4 @@ b5ee72a3-54dd-c4b8-551c-4bdc0204cedb ## Related Functions -- [`uuidv5`](/docs/from-1.5/functions/uuid/uuidv5), which generates name-based UUIDs. +- [`uuidv5`](//docs/templates/hcl_templates/functions/uuid/uuidv5), which generates name-based UUIDs. diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx index 8d7341eba..2a86c81e8 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx @@ -16,7 +16,7 @@ description: |- uuidv5(namespace, name) ``` -Unlike the pseudo-random UUIDs generated by [`uuidv4`](/docs/from-1.5/functions/uuid/uuidv4), +Unlike the pseudo-random UUIDs generated by [`uuidv4`](//docs/templates/hcl_templates/functions/uuid/uuidv4), name-based UUIDs derive from namespace and an name, producing the same UUID value every time if the namespace and name are unchanged. @@ -76,4 +76,4 @@ human-significant manner, such as by reference to the standard that defined it. ## Related Functions -- [`uuidv4`](/docs/from-1.5/functions/uuid), which generates pseudorandom UUIDs. +- [`uuidv4`](//docs/templates/hcl_templates/functions/uuid), which generates pseudorandom UUIDs. diff --git a/website/content/docs/templates/hcl_templates/index.mdx b/website/content/docs/templates/hcl_templates/index.mdx index abe934b58..29644b4d0 100644 --- a/website/content/docs/templates/hcl_templates/index.mdx +++ b/website/content/docs/templates/hcl_templates/index.mdx @@ -56,14 +56,14 @@ source "amazon-ebs" "main" { For full details about Packer's syntax, see: -- [Configuration Syntax](/docs/from-1.5/syntax) -- [Expressions](/docs/from-1.5/expressions) +- [Configuration Syntax](//docs/templates/hcl_templates/syntax) +- [Expressions](//docs/templates/hcl_templates/expressions) ## Code Organization The HCL language uses configuration files that are named with the `.pkr.hcl` file extension. There is also [a JSON-based variant of the -language](/docs/from-1.5/syntax-json) that is named with the `.pkr.json` file +language](//docs/templates/hcl_templates/syntax-json) that is named with the `.pkr.json` file extension. Configuration files must always use UTF-8 encoding, and by convention are diff --git a/website/content/docs/templates/hcl_templates/locals.mdx b/website/content/docs/templates/hcl_templates/locals.mdx index deb07a961..f97db6513 100644 --- a/website/content/docs/templates/hcl_templates/locals.mdx +++ b/website/content/docs/templates/hcl_templates/locals.mdx @@ -13,7 +13,7 @@ description: >- Local values assign a name to an expression, that can then be used multiple times within a folder. -If [variables](/docs/from-1.5/variables) are analogous to function arguments then +If [variables](//docs/templates/hcl_templates/variables) are analogous to function arguments then _local values_ are comparable to a function's local variables. Input variable and local variable usage are introduced in the [_Variables diff --git a/website/content/docs/templates/hcl_templates/path-variables.mdx b/website/content/docs/templates/hcl_templates/path-variables.mdx index e5c17e41f..a7d94f839 100644 --- a/website/content/docs/templates/hcl_templates/path-variables.mdx +++ b/website/content/docs/templates/hcl_templates/path-variables.mdx @@ -24,16 +24,16 @@ locals { ## Related Functions -- [`abspath`](/docs/from-1.5/functions/file/abspath) takes a string containing +- [`abspath`](//docs/templates/hcl_templates/functions/file/abspath) takes a string containing a filesystem path and converts it to an absolute path. -- [`basename`](/docs/from-1.5/functions/file/basename) returns _only_ the last +- [`basename`](//docs/templates/hcl_templates/functions/file/basename) returns _only_ the last portion of a filesystem path, discarding the portion that would be returned by `dirname`. -- [`fileset`](/docs/from-1.5/functions/file/fileset) enumerates a set of +- [`fileset`](//docs/templates/hcl_templates/functions/file/fileset) enumerates a set of regular file names given a path and pattern. -- [`dirname`](/docs/from-1.5/functions/file/dirname) returns all of the +- [`dirname`](//docs/templates/hcl_templates/functions/file/dirname) returns all of the segments of a filesystem path _except_ the last, discarding the portion that would be returned by `basename`. diff --git a/website/content/docs/templates/hcl_templates/syntax-json.mdx b/website/content/docs/templates/hcl_templates/syntax-json.mdx index f523c5d97..69a01d364 100644 --- a/website/content/docs/templates/hcl_templates/syntax-json.mdx +++ b/website/content/docs/templates/hcl_templates/syntax-json.mdx @@ -11,7 +11,7 @@ description: |- `@include 'from-1.5/beta-hcl2-note.mdx'` Most Packer configurations are written in [the native HCL -syntax](/docs/from-1.5/syntax), which is designed to be easy for humans to read and +syntax](//docs/templates/hcl_templates/syntax), which is designed to be easy for humans to read and update. Packer also supports an alternative syntax that is JSON-compatible. This @@ -97,7 +97,7 @@ different (see [block-type-specific exceptions](#block-type-specific-exceptions) correspond either to argument names or to nested block type names. - Where a property corresponds to an argument that accepts - [arbitrary expressions](/docs/from-1.5/expressions) in the native syntax, the + [arbitrary expressions](//docs/templates/hcl_templates/expressions) in the native syntax, the property value is mapped to an expression as described under [_Expression Mapping_](#expression-mapping) below. For arguments that do _not_ accept arbitrary expressions, the interpretation of the property @@ -114,20 +114,20 @@ different (see [block-type-specific exceptions](#block-type-specific-exceptions) ## Expression Mapping Since JSON grammar is not able to represent all of the Packer language -[expression syntax](/docs/from-1.5/expressions), JSON values interpreted as expressions +[expression syntax](//docs/templates/hcl_templates/expressions), JSON values interpreted as expressions are mapped as follows: | JSON | Packer Language Interpretation | | ------- | ----------------------------------------------------------------------------------------------------------------- | | Boolean | A literal `bool` value. | | Number | A literal `number` value. | -| String | Parsed as a [string template](/docs/from-1.5/expressions#string-templates) and then evaluated as described below. | +| String | Parsed as a [string template](//docs/templates/hcl_templates/expressions#string-templates) and then evaluated as described below. | | Object | Each property value is mapped per this table, producing an `object(...)` value with suitable attribute types. | | Array | Each element is mapped per this table, producing a `tuple(...)` value with suitable element types. | | Null | A literal `null`. | When a JSON string is encountered in a location where arbitrary expressions are -expected, its value is first parsed as a [string template](/docs/from-1.5/expressions#string-templates) +expected, its value is first parsed as a [string template](//docs/templates/hcl_templates/expressions#string-templates) and then it is evaluated to produce the final result. If the given template consists _only_ of a single interpolation sequence, diff --git a/website/content/docs/templates/hcl_templates/syntax.mdx b/website/content/docs/templates/hcl_templates/syntax.mdx index b16832362..817585479 100644 --- a/website/content/docs/templates/hcl_templates/syntax.mdx +++ b/website/content/docs/templates/hcl_templates/syntax.mdx @@ -18,7 +18,7 @@ are built from. This page describes the _native syntax_ of HCL, which is a rich language designed to be easy for humans to read and write. The constructs in HCL can -also be expressed in [JSON syntax](/docs/from-1.5/syntax-json), which is harder for +also be expressed in [JSON syntax](//docs/templates/hcl_templates/syntax-json), which is harder for humans to read and edit but easier to generate and parse programmatically. This low-level syntax of HCL is defined in terms of a syntax called _HCL_, @@ -48,7 +48,7 @@ after the equals sign is the argument's value. The context where the argument appears determines what value types are valid (for example, each source type has a schema that defines the types of its arguments), but many arguments accept arbitrary -[expressions](/docs/from-1.5/expressions), which allow the value to +[expressions](//docs/templates/hcl_templates/expressions), which allow the value to either be specified literally or generated from other values programmatically. ### Blocks diff --git a/website/content/docs/templates/hcl_templates/variables.mdx b/website/content/docs/templates/hcl_templates/variables.mdx index e9d0f3b34..29c8f502a 100644 --- a/website/content/docs/templates/hcl_templates/variables.mdx +++ b/website/content/docs/templates/hcl_templates/variables.mdx @@ -24,7 +24,7 @@ Guide_](/guides/hcl/variables). variable is being discussed. Other kinds of variables in Packer include _environment variables_ (set by the shell where Packer runs) and _expression variables_ (used to indirectly represent a value in an -[expression](/docs/from-1.5/expressions)). +[expression](//docs/templates/hcl_templates/expressions)). ## Declaring an Input Variable @@ -84,7 +84,7 @@ configuration. ## Using Input Variable Values Within the build that declared a variable, its value can be accessed from -within [expressions](/docs/from-1.5/expressions) as `var.`, where `` +within [expressions](//docs/templates/hcl_templates/expressions) as `var.`, where `` matches the label given in the declaration block: ```hcl @@ -100,7 +100,7 @@ the folder where it was declared. ## Type Constraints The `type` argument in a `variable` block allows you to restrict the [type of -value](/docs/from-1.5/expressions#types-and-values) that will be accepted as the value +value](//docs/templates/hcl_templates/expressions#types-and-values) that will be accepted as the value for a variable. If no type constraint is set then a value of any type is accepted. @@ -242,7 +242,7 @@ case letters as in the above example. ### Complex-typed Values When variable values are provided in a variable definitions file, Packer's -[usual syntax](/docs/from-1.5/expressions) can be used to assign +[usual syntax](//docs/templates/hcl_templates/expressions) can be used to assign complex-typed values, like lists and maps. Some special rules apply to the `-var` command line option and to environment diff --git a/website/content/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx b/website/content/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx index ae957a5e8..ea27adc86 100644 --- a/website/content/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx +++ b/website/content/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx @@ -55,5 +55,5 @@ - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular 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. diff --git a/website/content/partials/builder/amazon/chroot/Config-not-required.mdx b/website/content/partials/builder/amazon/chroot/Config-not-required.mdx index 7d5084e58..f37695729 100644 --- a/website/content/partials/builder/amazon/chroot/Config-not-required.mdx +++ b/website/content/partials/builder/amazon/chroot/Config-not-required.mdx @@ -81,7 +81,7 @@ if building based on top of a source_ami which is also io1. - `source_ami_filter` (awscommon.AmiFilterOptions) - Filters used to populate the source_ami field. Example: - + ```json { "source_ami_filter": { @@ -95,26 +95,26 @@ } } ``` - + This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE: This will fail unless *exactly* one AMI is returned. In the above example, `most_recent` will cause this to succeed by selecting the newest image. - + - `filters` (map of strings) - filters used to select a `source_ami`. NOTE: This will fail unless *exactly* one AMI is returned. Any filter described in the docs for [DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) is valid. - + - `owners` (array of strings) - Filters the images by their owner. You may specify one or more AWS account IDs, "self" (which will use the account whose credentials you are using to run Packer), or an AWS owner alias: for example, "amazon", "aws-marketplace", or "microsoft". This option is required for security reasons. - + - `most_recent` (boolean) - Selects the newest created image when true. This is most useful for selecting a daily distro build. - + You may set this in place of `source_ami` or in conjunction with it. If you set this in conjunction with `source_ami`, the `source_ami` will be added to the filter. The provided `source_ami` must meet all of the filtering @@ -127,7 +127,7 @@ - `root_volume_tag` ([]{key string, value string}) - 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 - [`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. - `root_volume_encrypt_boot` (boolean) - Whether or not to encrypt the volumes that are *launched*. By default, Packer will keep @@ -135,16 +135,16 @@ always result in an encrypted one. - `root_volume_kms_key_id` (string) - ID, alias or ARN of the KMS key to use for *launched* volumes encryption. - + Set this value if you select `root_volume_encrypt_boot`, but don't want to use the region's default KMS key. - + If you have a custom kms key you'd like to apply to the launch volume, and are only building in one region, it is more efficient to set this and `root_volume_encrypt_boot` to `true` and not use `encrypt_boot` and `kms_key_id`. This saves potentially many minutes at the end of the build by preventing Packer from having to copy and re-encrypt the image at the end of the build. - + For valid formats see *KmsKeyId* in the [AWS API docs - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). This field is validated by Packer, when using an alias, you will have to diff --git a/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx b/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx index 06ed86b6c..baae2d91d 100644 --- a/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx +++ b/website/content/partials/builder/amazon/common/AMIConfig-not-required.mdx @@ -34,13 +34,13 @@ - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular 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. - `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy. - + Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's documentation on enabling enhanced networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking). @@ -64,12 +64,12 @@ the encryption setting to what it was in the source image. Setting false will result in an unencrypted image, and true will result in an encrypted one. - + If you have used the `launch_block_device_mappings` to set an encryption key and that key is the same as the one you want the image encrypted with at the end, then you don't need to set this field; leaving it empty will prevent an unnecessary extra copy step and save you some time. - + Please note that if you are using an account with the global "Always encrypt new EBS volumes" option set to `true`, Packer will be unable to override this setting, and the final image will be encryoted whether @@ -79,17 +79,17 @@ only applies to the main `region` -- any regions the AMI gets copied to copied will be encrypted by the default EBS KMS key for that region, unless you set region-specific keys in AMIRegionKMSKeyIDs. - + Set this value if you select `encrypt_boot`, but don't want to use the region's default KMS key. - + If you have a custom kms key you'd like to apply to the launch volume, and are only building in one region, it is more efficient to leave this and `encrypt_boot` empty and to instead set the key id in the launch_block_device_mappings (you can find an example below). This saves potentially many minutes at the end of the build by preventing Packer from having to copy and re-encrypt the image at the end of the build. - + For valid formats see *KmsKeyId* in the [AWS API docs - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). This field is validated by Packer, when using an alias, you will have to @@ -105,7 +105,7 @@ conjunction with `snapshot_users` -- in that situation you must use custom keys. For valid formats see *KmsKeyId* in the [AWS API docs - CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html). - + This option supercedes the `kms_key_id` option -- if you set both, and they are different, Packer will respect the value in `region_kms_key_ids` for your build region and silently disregard the @@ -124,7 +124,7 @@ - `snapshot_tag` ([]{key string, value string}) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular 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. - `snapshot_users` ([]string) - A list of account IDs that have diff --git a/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx b/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx index 72d468546..08271dd82 100644 --- a/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx +++ b/website/content/partials/builder/amazon/common/RunConfig-not-required.mdx @@ -23,7 +23,7 @@ Packer will still wait for the instance to be stopped, and failing to send the stop signal yourself, when you have set this flag to `true`, will cause a timeout. - + An example of a valid windows shutdown command in a `windows-shell` provisioner is : ```shell-session @@ -54,12 +54,12 @@ up a [T2 Standard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-std.html) instance instead. - + To use T2 Unlimited you must use a T2 instance type, e.g. `t2.micro`. Additionally, T2 Unlimited cannot be used in conjunction with Spot Instances, e.g. when the `spot_price` option has been configured. Attempting to do so will cause an error. - + !> **Warning!** Additional costs may be incurred by enabling T2 Unlimited - even for instances that would usually qualify for the [AWS Free Tier](https://aws.amazon.com/free/). @@ -72,7 +72,7 @@ - `temporary_iam_instance_profile_policy_document` (\*PolicyDocument) - Temporary IAM instance profile policy document If IamInstanceProfile is specified it will be used instead. Example: - + ```json { "Version": "2012-10-17", @@ -93,7 +93,7 @@ terminate. Defaults to stop. - `security_group_filter` (SecurityGroupFilterOptions) - Filters used to populate the `security_group_ids` field. JSON Example: - + ```json { "security_group_filter": { @@ -103,9 +103,9 @@ } } ``` - + HCL2 Example: - + ```hcl security_group_filter { filters = { @@ -113,14 +113,14 @@ } } ``` - + This selects the SG's with tag `Class` with the value `packer`. - + - `filters` (map of strings) - filters used to select a `security_group_ids`. Any filter described in the docs for [DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html) is valid. - + `security_group_ids` take precedence over this. - `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is that is *launched* @@ -130,7 +130,7 @@ - `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular 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. - `security_group_id` (string) - The ID (not the name) of the security @@ -145,7 +145,7 @@ - `source_ami_filter` (AmiFilterOptions) - Filters used to populate the `source_ami` field. JSON Example: - + ```json "builders" [ { @@ -163,7 +163,7 @@ ] ``` HCL2 example: - + ```hcl source "amazon-ebs" "basic-example" { source_ami_filter { @@ -177,26 +177,26 @@ } } ``` - + This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE: This will fail unless *exactly* one AMI is returned. In the above example, `most_recent` will cause this to succeed by selecting the newest image. - + - `filters` (map of strings) - filters used to select a `source_ami`. NOTE: This will fail unless *exactly* one AMI is returned. Any filter described in the docs for [DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) is valid. - + - `owners` (array of strings) - Filters the images by their owner. You may specify one or more AWS account IDs, "self" (which will use the account whose credentials you are using to run Packer), or an AWS owner alias: for example, `amazon`, `aws-marketplace`, or `microsoft`. This option is required for security reasons. - + - `most_recent` (boolean) - Selects the newest created image when true. This is most useful for selecting a daily distro build. - + You may set this in place of `source_ami` or in conjunction with it. If you set this in conjunction with `source_ami`, the `source_ami` will be added to the filter. The provided `source_ami` must meet all of the filtering @@ -217,7 +217,7 @@ time period your instances are running. Spot Instance prices are set by Amazon EC2 and adjust gradually based on long-term trends in supply and demand for Spot Instance capacity. - + When this field is set, it represents the maximum hourly price you are willing to pay for a spot instance. If you do not set this value, it defaults to a maximum price equal to the on demand price of the @@ -234,12 +234,12 @@ - `spot_tag` ([]{key string, value string}) - Same as [`spot_tags`](#spot_tags) but defined as a singular 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. - `subnet_filter` (SubnetFilterOptions) - Filters used to populate the `subnet_id` field. JSON Example: - + ```json "builders" [ { @@ -255,7 +255,7 @@ ] ``` HCL2 example: - + ```hcl source "amazon-ebs" "basic-example" { subnet_filter { @@ -267,24 +267,24 @@ } } ``` - + This selects the Subnet with tag `Class` with the value `build`, which has the most free IP addresses. NOTE: This will fail unless *exactly* one Subnet is returned. By using `most_free` or `random` one will be selected from those matching the filter. - + - `filters` (map of strings) - filters used to select a `subnet_id`. NOTE: This will fail unless *exactly* one Subnet is returned. Any filter described in the docs for [DescribeSubnets](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html) is valid. - + - `most_free` (boolean) - The Subnet with the most free IPv4 addresses will be used if multiple Subnets matches the filter. - + - `random` (boolean) - A random Subnet will be used if multiple Subnets matches the filter. `most_free` have precendence over this. - + `subnet_id` take precedence over this. - `subnet_id` (string) - If using VPC, the ID of the subnet, such as @@ -293,13 +293,13 @@ - `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware. - + The default is "default", meaning shared tenancy. Allowed values are "default", "dedicated" and "host". - `temporary_security_group_source_cidrs` ([]string) - A list of IPv4 CIDR blocks to be authorized access to the instance, when packer is creating a temporary security group. - + The default is [`0.0.0.0/0`] (i.e., allow any IPv4 source). This is only used when `security_group_id` or `security_group_ids` is not specified. @@ -314,7 +314,7 @@ - `vpc_filter` (VpcFilterOptions) - Filters used to populate the `vpc_id` field. JSON Example: - + ```json "builders" [ { @@ -330,7 +330,7 @@ ] ``` HCL2 example: - + ```hcl source "amazon-ebs" "basic-example" { vpc_filter { @@ -342,17 +342,17 @@ } } ``` - + This selects the VPC with tag `Class` with the value `build`, which is not the default VPC, and have a IPv4 CIDR block of `/24`. NOTE: This will fail unless *exactly* one VPC is returned. - + - `filters` (map of strings) - filters used to select a `vpc_id`. NOTE: This will fail unless *exactly* one VPC is returned. Any filter described in the docs for [DescribeVpcs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html) is valid. - + `vpc_id` take precedence over this. - `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID @@ -370,12 +370,12 @@ if inside a VPC is to use the public IP address if available, otherwise the private IP address will be used. If not in a VPC the public DNS name will be used. Also works for WinRM. - + Where Packer is configured for an outbound proxy but WinRM traffic should be direct, `ssh_interface` must be set to `private_dns` and `.compute.internal` included in the `NO_PROXY` environment variable. - + When using `session_manager` the machine running Packer must have the AWS Session Manager Plugin installed and within the users' system path. Connectivity via the `session_manager` interface establishes a secure tunnel diff --git a/website/content/partials/builder/amazon/ebs/Config-not-required.mdx b/website/content/partials/builder/amazon/ebs/Config-not-required.mdx index 2a152c906..e791ca10f 100644 --- a/website/content/partials/builder/amazon/ebs/Config-not-required.mdx +++ b/website/content/partials/builder/amazon/ebs/Config-not-required.mdx @@ -24,7 +24,7 @@ - `run_volume_tag` ([]{name string, value string}) - 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 - [`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. - `no_ephemeral` (bool) - Relevant only to Windows guests: If you set this flag, we'll add clauses diff --git a/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx b/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx index 71951af3d..c90aadfa4 100644 --- a/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx +++ b/website/content/partials/builder/amazon/ebssurrogate/Config-not-required.mdx @@ -24,7 +24,7 @@ - `run_volume_tag` ([]{name string, value string}) - 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 - [`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. - `ami_architecture` (string) - what architecture to use when registering the diff --git a/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx b/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx index f34134d5b..d3ba79efc 100644 --- a/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx +++ b/website/content/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx @@ -6,5 +6,5 @@ - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular 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. diff --git a/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx b/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx index ef4f375a7..9a670af19 100644 --- a/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx +++ b/website/content/partials/builder/amazon/ebsvolume/Config-not-required.mdx @@ -29,7 +29,7 @@ in the `ebs_volumes` setting. This is a [template engine](/docs/templates/engine), see [Build template data](#build-template-data) for more information. - + Note: The tags specified here will be *temporarily* applied to volumes specified in `ebs_volumes` - but only while the instance is being created. Packer will replace all tags on the volume with the tags @@ -39,5 +39,5 @@ - `run_volume_tag` ([]{key string, value string}) - 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 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. diff --git a/website/content/partials/builder/azure/arm/Config-not-required.mdx b/website/content/partials/builder/azure/arm/Config-not-required.mdx index f1bfc1ec9..0d2a4f351 100644 --- a/website/content/partials/builder/azure/arm/Config-not-required.mdx +++ b/website/content/partials/builder/azure/arm/Config-not-required.mdx @@ -16,7 +16,7 @@ as the source for this build. *VHD targets are incompatible with this build type* - the target must be a *Managed Image*. When using shared_image_gallery as a source, image_publisher, image_offer, image_sku, image_version, and custom_managed_image_name should not be set. - + In JSON ```json "shared_image_gallery": { @@ -43,9 +43,9 @@ ``` - `shared_image_gallery_destination` (SharedImageGalleryDestination) - The name of the Shared Image Gallery under which the managed image will be published as Shared Gallery Image version. - + Following is an example. - + In JSON ```json "shared_image_gallery_destination": { @@ -96,7 +96,7 @@ across regions due to image synchronization latency. To ensure a consistent version across regions set this value to one that is available in all regions where you are deploying. - + CLI example `az vm image list --location westus --publisher Canonical --offer UbuntuServer --sku 16.04.0-LTS --all` @@ -106,7 +106,7 @@ VM from your VHD. See [pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/) information. Defaults to `Standard_A1`. - + CLI example `az vm list-sizes --location westus` - `managed_image_resource_group_name` (string) - Specify the managed image resource group name where the result of the @@ -144,7 +144,7 @@ - `azure_tag` ([]{name string, value string}) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable 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. - `resource_group_name` (string) - Resource group under which the final artifact will be stored. @@ -203,9 +203,9 @@ terms](https://aka.ms/azuremarketplaceapideployment) for more details. Not all Marketplace images support programmatic deployment, and support is controlled by the image publisher. - + An example plan\_info object is defined below. - + ```json { "plan_info": { @@ -215,17 +215,17 @@ } } ``` - + `plan_name` (string) - The plan name, required. `plan_product` (string) - The plan product, required. `plan_publisher` (string) - The plan publisher, required. `plan_promotion_code` (string) - Some images accept a promotion code, optional. - + Images created from the Marketplace with `plan_info` **must** specify `plan_info` whenever the image is deployed. The builder automatically adds tags to the image to ensure this information is not lost. The following tags are added. - + ```text 1. PlanName 2. PlanProduct @@ -257,12 +257,12 @@ or [Linux](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds) for more information. - + For VHD builds the final artifacts will be named `PREFIX-dataDisk-.UUID.vhd` and stored in the specified capture container along side the OS disk. The additional disks are included in the deployment template `PREFIX-vmTemplate.UUID`. - + For Managed build the final artifacts are included in the managed image. The additional disk will have the same storage account type as the OS disk, as specified with the `managed_image_storage_account_type` diff --git a/website/content/partials/builder/hyperone/Config-not-required.mdx b/website/content/partials/builder/hyperone/Config-not-required.mdx index 862552a19..b8b3fbb94 100644 --- a/website/content/partials/builder/hyperone/Config-not-required.mdx +++ b/website/content/partials/builder/hyperone/Config-not-required.mdx @@ -19,7 +19,7 @@ - `image_tag` ([]{key string, value string}) - Same as [`image_tags`](#image_tags) but defined as a singular 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. - `image_service` (string) - The service of the resulting image. @@ -30,7 +30,7 @@ - `vm_tag` ([]{name string, value string}) - Same as [`vm_tags`](#vm_tags) but defined as a singular 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. - `disk_name` (string) - The name of the created disk. diff --git a/website/content/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx b/website/content/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx index 1dbdc9bc6..ad800443d 100644 --- a/website/content/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx +++ b/website/content/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx @@ -65,7 +65,7 @@ - `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular 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. - `ssh_private_ip` (bool) - SSH Private Ip diff --git a/website/content/partials/builder/triton/SourceMachineConfig-not-required.mdx b/website/content/partials/builder/triton/SourceMachineConfig-not-required.mdx index 725b952e5..b9b1488b5 100644 --- a/website/content/partials/builder/triton/SourceMachineConfig-not-required.mdx +++ b/website/content/partials/builder/triton/SourceMachineConfig-not-required.mdx @@ -27,7 +27,7 @@ - `source_machine_tag` ([]{key string, value string}) - 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 - [`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. - `source_machine_firewall_enabled` (bool) - Whether or not the firewall diff --git a/website/content/partials/builder/triton/TargetImageConfig-not-required.mdx b/website/content/partials/builder/triton/TargetImageConfig-not-required.mdx index b42b2fdfe..52ccab6d0 100644 --- a/website/content/partials/builder/triton/TargetImageConfig-not-required.mdx +++ b/website/content/partials/builder/triton/TargetImageConfig-not-required.mdx @@ -17,5 +17,5 @@ - `image_tag` ([]{name string, value string}) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable 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. diff --git a/website/content/partials/from-1.5/variables/custom-validation.mdx b/website/content/partials/from-1.5/variables/custom-validation.mdx index 8a6ef4a09..f7c496ae7 100644 --- a/website/content/partials/from-1.5/variables/custom-validation.mdx +++ b/website/content/partials/from-1.5/variables/custom-validation.mdx @@ -22,7 +22,7 @@ The expression can refer only to the variable that the condition applies to, and _must not_ produce errors. If the failure of an expression is the basis of the validation decision, use -[the `can` function](/docs/from-1.5/functions/conversion/can) to detect such errors. For example: +[the `can` function](//docs/templates/hcl_templates/functions/conversion/can) to detect such errors. For example: ```hcl variable "image_id" { diff --git a/website/redirects.next.js b/website/redirects.next.js index c2591992e..4d8a3dafc 100644 --- a/website/redirects.next.js +++ b/website/redirects.next.js @@ -137,13 +137,13 @@ module.exports = [ permanent: true, }, { - source: '/docs/configuration/from-1.5/:path*', - destination: '/docs/from-1.5/:path*', + source: '/docs/templates/hcl_templates/:path*', + destination: '//docs/templates/hcl_templates/:path*', permanent: true, }, { - source: '/docs/configuration/from-1.5/:path*/overview', - destination: '/docs/from-1.5/:path*', + source: '/docs/templates/hcl_templates/:path*/overview', + destination: '//docs/templates/hcl_templates/:path*', permanent: true, }, {