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
adding a * catchall for var interpolation #6284
Conversation
Hi @mzupan! Thanks for the effort involved in a PR here. I don't personally have an opinion here on whether a catch all lookup is a good idea (perhaps @mitchellh or @phinze do), but the implementation will need some rework because of changes to how maps work on the |
My initial reaction is: good idea! 😄 I didn't look at the PR (I'll leave that to @jen20 since he is most familiar with these code paths right now), so I'll just talk about high levels, UX, any pitfalls I see, etc. But since I didn't look at the PR, I apologize if your code already addresses this (likely does), I just want to be complete for the text history. I think the functionality of this from a UX perspective is simple. When looking up "foo" in map "m":
👍 |
@mitchellh this needs re-implementing for 0.7 so I am inclined to defer it until then (the implementation for the current tree looks good, however). As part of this, do you think we should modify HCL to allow |
@jen20 Agreed, 0.7 |
@mitchellh yes correct it will look for a key first and if not found it'll look for the |
@jen20 I'm fine trying to get it into 0.7 if someone lets me know how to try to go about doing it if not I can wait and use this patch till it gets released |
Can we get this merged in both 0.6.x and 0.7.x so that we can leverage this quicker? I hope there is 0.6.15 coming up at the least (looking at master's CHANGELOG.md)? |
0.7 isn't too far away (0.6.15 will come out sooner), and we've done significant changes there. We'll likely just push this into there to avoid any instability in 0.6.x. Trust me that 0.7 is close. |
I created a new PR for 0.7 #6351 so this can be closed since it won't go into 0.6 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This adds the following functionality for #2312
It allows a catch all. The
*
needs to be quotes since terraform thinks its an invalid character.I tried to edit the test but my knowledge of test writing in go is bad at best. This passes all my tests that I tried.