Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow expressions in string interpolation #143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zabacad
Copy link

@zabacad zabacad commented Sep 13, 2023

HCL allows for any expression in a string interpolation. This updates the grammar and transformer to match, allowing for arbitrarily-deep nesting.

HCL allows for any expression in a string interpolation. This updates the
grammar and transformer to match, allowing for arbitrarily-deep nesting.
@zabacad zabacad requested a review from a team September 13, 2023 00:01
@piotrb
Copy link

piotrb commented Aug 6, 2024

I just want to throw my 2c here, I used this patch as part of an internal tool that parses terragrunt hcl files to generate stack information for setting up spacelift stacks :) and this patch definitely works :) .. it does of course change the internal structure of the lark nodes being returned, but it works great to solve the issue at hand around supporting expressions inside interpolations.

@Qantas94Heavy
Copy link

Is there anything blocking this from being merged? This is impeding our use of python-hcl2 in our internal tooling and patching/forking this would be a lot of overhead for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants