fix: bump hcl2json parser to v0.6.9 for namespaced provider functions#535
Merged
Conversation
Bump the pinned hcl2json (HCLToJSON) parser from v0.6.0 to v0.6.9 so it can parse Terraform provider-defined (namespaced) functions used in the accelerator templates, e.g. provider::azapi::parse_resource_id. Root cause: v0.6.0 vendors hashicorp/hcl/v2 v2.17.0, which predates support for the namespaced provider::<ns>::<func>() call syntax (added in hcl v2.20.0). It therefore fails parsing variables.connectivity.virtual.wan.tf with 'Missing argument separator' at the first ::. v0.6.9 vendors hcl v2.24.0, which fully supports the syntax. The release assets keep the same naming scheme, so Get-HCLParserTool needs no changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jtracey93
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the pinned
hcl2json(HCLToJSON) parser version fromv0.6.0tov0.6.9inDeploy-Accelerator.ps1, so the accelerator can parse Terraform provider-defined (namespaced) functions.Root cause
When running
Deploy-Accelerator, the ALZ module downloads thetmccombs/hcl2jsonbinary and uses it to convert the accelerator'svariables.*.tftemplate files into JSON to build the input config schema.A template in the
alz-terraform-acceleratorrepo (templates/platform_landing_zone/variables.connectivity.virtual.wan.tf) now uses a provider-defined function:The pinned
hcl2jsonv0.6.0vendorsgithub.com/hashicorp/hcl/v2 v2.17.0, which predates support for the namespacedprovider::<ns>::<func>()call syntax (added tohashicorp/hcl/v2in v2.20.0, "Support for namespaced functions"). Sov0.6.0parsesprovideras a normal identifier, hits the first::, and fails:(col 22–23 is exactly the first
::.)Fix
Bump to
hcl2jsonv0.6.9(latest release), which vendorshashicorp/hcl/v2 v2.24.0and fully supports the namespaced function syntax. This unblocks parsing ofprovider::azapi::parse_resource_idin the platform landing zone variables.Notes
Private/Tools/Get-HCLParserTool.ps1needs no changes — it builds the asset filename ashcl2json_<os>_<arch>(plus.exeon Windows) and downloads fromhttps://github.com/tmccombs/hcl2json/releases/download/<toolVersion>/<asset>. Thev0.6.9release assets keep the same naming scheme, so the downloader is compatible.v0.6.0was the only hard-coded reference to the parser version in the repo; the.gitignoreentry for the binary is version-agnostic and the unit tests mockGet-HCLParserTool..psd1ModuleVersion is intentionally left untouched, matching repo precedent.Validation
Invoke-Build -File .\src\ALZ.build.ps1 -Task TestLocal→ Build succeeded. 7 tasks, 0 errors, 0 warnings.Files changed
src/ALZ/Public/Deploy-Accelerator.ps1—toolVersionv0.6.0→v0.6.9