-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
hcl2template: add alltrue & anytrue function #13237
Conversation
3eca8c7
to
636c4f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, I left a couple comments mostly about the copyright/license header, and left one question on the implementation of any_true
, but besides those we're good to go.
Pre-approving this one
636c4f4
to
c17afbc
Compare
add an hcl2 function that return true if all the value in a collection are true, this function was derived from terraform codebase
this function add the hcl2 anytrue function which takes a collection and return true if any of the element is true.
c17afbc
to
0e25a9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
alltrue
Function that return
true
if all elements of the collection aretrue
manual tests
tested with
packer console --config-type=hcl2
anytrue
Function that return
true
if at least 1 element istrue
manual tests
tested with
packer console --config-type=hcl2
Closes #13073