hashicorp / hashicorp/hcl

Multi-file parsing examples

Open
#298 1 comment 1 reaction 0 assignees View on GitHub
core documentation v2
Dominant language
Go
Stars
5.8k
Forks
659
Avg merge
20h 36m
Merged PRs (30d)
6

Description

I've been considering playing with HCL2 for a project that would need to parse a directories full of inter-related HCL files, much like Terraform does. These files may have objects that are referring to one another across file boundaries. I see reference to how Terraform does this (at a high level) in the HCL1 docs, but I'm not quite fully understanding.

It would be wonderful to have some examples in the guide (ie: https://github.com/hashicorp/hcl2/blob/master/guide/go_parsing.rst) for how to handle this "parse a directory of HCL files" usage case. The single-file usage case seems super easy to tackle with the hcl2 parser, but I wonder if there might be others out there (like myself) who want the multi-file, TF-like behavior.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with guide/go_parsing.rst and the HCL1 documentation referenced in the issue, then review how Terraform handles directories of inter-related HCL files. Document a multi-file parsing example covering references across file boundaries, with enough guidance for users who understand the existing single-file example.】【。

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.