Quantcast
Channel: Blog O' Matty on Prefetch Technologies
Viewing all articles
Browse latest Browse all 43

Using Terraform for_each statements and dynamic nested blocks to simply AWS security group Ingress statements

$
0
0
Over the past few months, I’ve been updating various Terraform modules to utilize the new features in 0.12. Among these, is the ability to iterate over dynamic blocks with for_each. Utilizing this new feature has allowed me to reduce the size of my security groups, while making them more readable. To show this feature in action, I will create a new map variable with the port as a key, and a list of CIDR blocks to allow in as the value:

Viewing all articles
Browse latest Browse all 43

Trending Articles