generated fromcloudposse/terraform-example-module
Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork23
aa12287 This commit was created on GitHub.com and signed with GitHub’sverified signature. The key has expired.
🐛 Bug Fixes
Fix: fix incorrect conditional logic for dynamic blocks iterating on `var.ec2_tag_set` and `var.ec2_tag_filter`@StephenTan-TW (#13)
what
Original PR description:
In order to ensure that tagging is processed correctly, I have created a PR of working code.
For some reason, we need to disable conditionals for ec2_tag_filter variable and we need to set the following conditional for ec2_tag_set:var.ec2_tag_set == null ? [] : [var.ec2_tag_set]
Note that I have had to do a huge rebase when pulling the upstream code. No idea what is going on.
- Swap second and third arguments in ternary operator for
var.ec2_tag_setandvar.ec2_tag_filter, which are incorrectly supplying an empty list if their lengths are > 0. - Use
lookupfunction in dynamic blocks in order to introduce more robustness.
why
- If
var.ec2_tag_setandvar.ec2_tag_filterare supplied as non-empty lists, theec2_tag_filterblocks will not be populated, since the ternary operator will evaluate to empty lists, and hence the dynamic block will produce no such blocks.
Assets2
Uh oh!
There was an error while loading.Please reload this page.