Now that Terraform 12 has been released and iterated on a few times, the highly anticipated for_each argument has officially been integrated directly inside the resource and data blocks. Allowing for the creation of dynamic blocks.
This for_each resource loop accepts any map or set to produce its dynamic set of resources.
e.g.