Terraform dynamic block support 👥

Bridgecrew now supports dynamic blocks in Terraform. Dynamic blocks are a useful way to create multiple configurations for the same resource by writing a structure for the configuration and then using a list or object to fill in the gaps. For example, instead of writing out multiple ingress rules with the same CIDR block and different ports, you can define the CIDR block and then create a list of ports.

Until now, dynamic blocks have been a black box or users would have to rely on plan files that are harder to trace to the offending code in the case of a misconfiguration. With dynamic block support, we’re able to correctly identify misconfigurations that exist in dynamic blocks, whether they are in a list, map, for loop, nested block, etc.

1999