From d2a840857743235d60a87ee7f0cbd77e2773de12 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 16 Feb 2021 13:57:33 +0100 Subject: [PATCH] update "how to comment in json" guide --- .../workflow-tips-and-tricks/use-packer-with-comment.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/content/guides/workflow-tips-and-tricks/use-packer-with-comment.mdx b/website/content/guides/workflow-tips-and-tricks/use-packer-with-comment.mdx index 64f2f1f78..40acaa673 100644 --- a/website/content/guides/workflow-tips-and-tricks/use-packer-with-comment.mdx +++ b/website/content/guides/workflow-tips-and-tricks/use-packer-with-comment.mdx @@ -8,6 +8,11 @@ description: |- # How to use jq to strip unsupported comments from a Packer template + +-> **Note:** Packer supports HCL2 from version 1.6.0, the Hashicorp Configuration +Language allows to comment directly in template files. Consider upgrading your +json template to hcl2 using the `packer hcl2_upgrade` command. + One of the biggest complaints we get about packer is that json doesn't use comments. We're in the process of moving to HCL2, the same config language used by Terraform, which does allow comments. But in the meantime, you can add detailed comments beyond the root-level underscore-prefixed field supported by Packer, and remove them using jq. Let's say we have a file named `commented_template.json`