Commit Graph
21 Commits
Author SHA1 Message Date
Pablo Garcia 55030eaa86 fix(hcl): coerce non-string object keys to strings instead of panicking (#2795)
HCL object keys may be non-string literals (e.g. a number like 1). The
decoder called cty.Value.AsString on the evaluated key, which panics with
'not a string' for any non-string key type. Mirror OpenTofu/Terragrunt by
silently converting non-string keys to their string representation via
cty/convert. Add decode scenarios covering numeric and boolean keys.
2026-08-07 14:53:18 +02:00
Mike Farah eb04fa87af More tests 2026-02-01 10:27:18 +11:00
Mike Farah ac2889c296 Fixed scalar encoding for HCL 2025-12-16 14:22:50 +11:00
Mike Farah d2d657eacc HCL improvements 2025-12-09 19:49:34 +11:00
Mike Farah f4fd8c585a Better roundtriping of HCL 2025-12-08 21:09:21 +11:00
fd405749f9 Add build tag to hcl_test.go to skip tests when HCL is disabled
Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
2025-12-08 20:30:47 +11:00
Mike Farah 77eccfd3db Fixed comment parsing, added generated docs 2025-12-08 20:30:47 +11:00
Mike Farah 554bf5a2f2 colorise output 2025-12-08 20:30:47 +11:00
Mike Farah 8162f3a100 wip - comments 2025-12-08 20:30:47 +11:00
Mike Farah 48707369a0 wip - comments 2025-12-08 20:30:47 +11:00
Mike Farah 8af768a015 wip 2025-12-08 20:30:47 +11:00
Mike Farah 5f3dcb1ccf Fixed processing of block labels 2025-12-08 20:30:47 +11:00
Mike Farah 6270c29f54 Fixed processing of nested data 2025-12-08 20:30:47 +11:00
Mike Farah df3101ce53 Refining 2025-12-08 20:30:47 +11:00
Mike Farah 65e79845d4 Refining 2025-12-08 20:30:47 +11:00
Mike Farah 8d430cf41c Use HCL encoder 2025-12-08 20:30:47 +11:00
Mike Farah 656f07d0c2 wip 2025-12-08 20:30:47 +11:00
Mike Farah 1852073f29 hcl - sorted decoding 2025-12-08 20:30:47 +11:00
Mike Farah 7d2c774e8f maps and strings 2025-12-08 20:30:47 +11:00
Mike Farah 69076dfe81 wip 2025-12-08 20:30:47 +11:00
Mike Farah 9e17cd683f First cut 2025-12-08 20:30:47 +11:00