This visual execution shows how Terraform decides between dynamic blocks and for_each. It starts by identifying repeated configuration. If nested blocks repeat inside one resource, dynamic blocks are used. If whole resources repeat, for_each is used on the resource. The example traces a security group resource with a dynamic ingress block looping over two rules. Each iteration creates one ingress nested block with a from_port value. After generating all blocks, the resource is ready for deployment. Variables track the list of ingress rules and current loop value. Key moments clarify that dynamic blocks create repeated nested blocks inside one resource, while for_each duplicates entire resources. The quiz tests understanding of loop values, step completion, and how changing input affects execution. The snapshot summarizes when to use dynamic blocks versus for_each in Terraform.