Dynamic block allows us to use chunks of re-asuble code, Hashicorp does not recommend the use of Dynamic Block. The best use case for creating a dynamic block is to create a security group. A dynamic block acts much like a for expression, but produces nested blocks instead of a complex typed value. It iterates over a given complex value and generates a nested block for each element of that complex value.