Closed KumarManoj-S closed 3 years ago
Hello,
Terraform now has dynamic block and for-expressions for constructing and assigning complex types, so I'm going to close this out. If you have more questions, we use GitHub issues for tracking bugs and enhancements, rather than for questions. While we can sometimes help with certain simple problems here, it's better to use the community forum where there are more people ready to help.
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.
Hi,
we have different environments such as
prod|staging|showcase
. I found a way how to create a resource based on the environments using count. Is there any way to assign a resource to an another resource based on a condition?To be more specific, we have WAF setup. Web ACL has list of rules and I want to attach a rule based on a condition. Below is my acl resource, (I want this whitelisting rule needs to be there for all the three environments)
And I want to attach one more rule but based on a condition, below is the rule that I want to add only on
showcase and staging
.Is there a way in terraform to achieve this? Can anybody help me how to handle this?