You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Meta-Argument count and new for_each are used to perform "if statements" in the case of count 0 or 1, in the case for_each empty set or set
Proposal
a) Provide a new Meta-Argument like condition or include_if instead of using count and for_each as a workaround for a if
b) allow resource information to be provided as content i.e. pass a data structue which represents the same lines as the DSL
I am surprise you can not do
locals {
something = {
prevent_destroy = true
}
}
dynamic "lifecycle" {
condition = can(var.ENVIRONMENT)
content = something # as long as the map is what the resource expects in this block. i.e. its passing prevent_destroy
}
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.
Current Terraform Version
All
Use-cases
The Meta-Argument
count
and newfor_each
are used to perform "if statements" in the case ofcount
0 or 1, in the casefor_each
empty set or setProposal
a) Provide a new Meta-Argument like
condition
orinclude_if
instead of usingcount
andfor_each
as a workaround for aif
b) allow resource information to be provided as
content
i.e. pass a data structue which represents the same lines as the DSLI am surprise you can not do
And also
As
The text was updated successfully, but these errors were encountered: