Skip to content

Allow expressions in string interpolation - #143

Closed
zabacad wants to merge 1 commit into
amplify-education:mainfrom
zabacad:string-interpolation-expressions
Closed

zabacad wants to merge 1 commit into
amplify-education:mainfrom
zabacad:string-interpolation-expressions

Conversation

@zabacad

@zabacad zabacad commented Sep 13, 2023

Copy link
Copy Markdown

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

piotrb commented Aug 6, 2024

Copy link
Copy Markdown

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
Copy Markdown

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.

@weaversam8

Copy link
Copy Markdown
Contributor

Hey @zabacad - I wanted to let you know that I missed this PR and accidentally duplicated your changes in my PR #177. Sorry about that! Hopefully that PR should be merged soon, fixing this issue.

@zabacad zabacad closed this Jan 16, 2025
@zabacad

zabacad commented Jan 16, 2025

Copy link
Copy Markdown
Author

I believe this is covered by #177, released in v6.0.0.

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.

4 participants