Closed brikis98 closed 1 year ago
OK, this is now ready for review. I added docs and examples; and by virtue of putting the examples and some test fixtures in the right folders, this also automatically adds tests.
Hm, there seems to be some issue preventing me from merging. Might be related to: https://github.com/orgs/community/discussions/58535. The suggestion there is to close and re-open the PR... Let me try that.
That... did not work. WTF.
Grr, no time to deal with this, will temporarily disable branch protection and merge.
Description
This PR adds
for_each
andfor_each_reference
support to thedependency
block ofboilerplate
. If you pass in a list to these attributes, instead of creating thedependency
once,boilerpalte
will loop over each item in thefor_each
list, and run the dependency once for each of those items. You can access the current item in the loop using__each__
.The main use case for this is to generate sub-folders and files dynamically: e.g., in https://github.com/gruntwork-io/prototypes/pull/361, I use this to generate environments (dev, stage, prod) dynamically, based on which environments the user asked for.
Bonus fix: remove Rho from CODEOWNERS; GitHub was showing an error about that.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].
Migration Guide