From 5dfeddc3a4bbf31dce0dca9f22523cbc81b630cd Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Mar 2020 17:05:42 -0500 Subject: [PATCH] guides/hcl: Add link to HCL2 issues tracked on the Packer repo This change adds a partial that contains a link to the HCL2 issues currently being tracked on GitHub. The partial has been added to the majority of the HCL2 guide documents as a way to help users learn about any open or recently resolved issues pertaining to the HCL2 support in Packer. --- website/source/guides/hcl/from-json-v1/index.html.md.erb | 2 ++ website/source/guides/hcl/index.html.md.erb | 4 +++- website/source/guides/hcl/variables/index.html.md.erb | 4 +++- website/source/partials/guides/hcl2-beta-note.md | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 website/source/partials/guides/hcl2-beta-note.md diff --git a/website/source/guides/hcl/from-json-v1/index.html.md.erb b/website/source/guides/hcl/from-json-v1/index.html.md.erb index cee1b0ac9..c83d02a4a 100644 --- a/website/source/guides/hcl/from-json-v1/index.html.md.erb +++ b/website/source/guides/hcl/from-json-v1/index.html.md.erb @@ -11,6 +11,8 @@ description: |- -> **Note:** Starting from version **1.5.0** Packer can read HCL2 files. +<%= partial "partials/guides/hcl2-beta-note" %> + We will soon provide a programatic way to transpose a v1 buildfile to a v1.5 HCL file. In the meantime we will show how to manually do it. diff --git a/website/source/guides/hcl/index.html.md.erb b/website/source/guides/hcl/index.html.md.erb index 555d06c94..b93f438ee 100644 --- a/website/source/guides/hcl/index.html.md.erb +++ b/website/source/guides/hcl/index.html.md.erb @@ -8,6 +8,8 @@ page_title: Getting started configuring Packer with HCL2 files -> **Note:** Starting from version **1.5.0** Packer can read HCL2 files. +<%= partial "partials/guides/hcl2-beta-note" %> + It is not necessary to know all of the details of the HCL syntax in order to use Packer, and so this page summarizes the most important details to get you started. If you are interested, you can find a [full definition of HCL @@ -67,7 +69,7 @@ source "amazon-ebs" "example-1" { source "virtualbox-iso" "example-2" { boot_command = < -/install/vmlinuz noapic +/install/vmlinuz noapic ... EOF } diff --git a/website/source/guides/hcl/variables/index.html.md.erb b/website/source/guides/hcl/variables/index.html.md.erb index ee7d6a701..aca9e2b71 100644 --- a/website/source/guides/hcl/variables/index.html.md.erb +++ b/website/source/guides/hcl/variables/index.html.md.erb @@ -9,6 +9,8 @@ description: |- # Input Variables and local variables +<%= partial "partials/guides/hcl2-beta-note" %> + This page introduces input variables and local variables as a way to parameterize a configuration. Once defined, input variables are settable from a default value, environment, special var files, and command line arguments. @@ -19,7 +21,7 @@ Local variables can be a compound of input variables and local variables. Let's create a file `variables.pkr.hcl` with the following contents. -> **Note**: that the file can be named anything, since Packer loads all -files ending in `.pkr.hcl` in a directory. If you split your configuration +files ending in `.pkr.hcl` in a directory. If you split your configuration across multiple files, use `packer build ` to initiate a build. diff --git a/website/source/partials/guides/hcl2-beta-note.md b/website/source/partials/guides/hcl2-beta-note.md new file mode 100644 index 000000000..e9343f06e --- /dev/null +++ b/website/source/partials/guides/hcl2-beta-note.md @@ -0,0 +1 @@ +\~> Support for HCL2 is currently in Beta, which means the feature you are looking for may still need some polishing. If you find problems, please check the list of open and resolved HCL2 issues on the [Packer Issue Tracker](https://github.com/hashicorp/packer/issues?q=is%3Aissue+is%3Aopen+label%3Ahcl2). For any strange behavior not already captured please create a new issue so that we can fix it!