hashicorp / hashicorp/hcl

No support for optional blocks

Open
#431 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
5.8k
Forks
657
Avg merge
20h 36m
Merged PRs (30d)
6

Description

I'm writing a program where I have a large amount of config where the defaults are fine and don't need to be explicitly specified by the end user; I'd like to be able to do e.g. `hcl:"Policies,block,optional"` and have hclsimple be fine with that block not being present.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating hclsimple's decoding path and how its struct tags describe blocks. Add coverage for an optional Policies block that is absent while defaults remain valid, then run the relevant hclsimple tests to confirm both absent and present blocks behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
compilers
Issue type
Feature
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.