data aws_regions all-aws-regions {} resource "null_resource" "shell" { for_each = data.aws_regions.all-aws-regions.names provisioner "local-exec" { command = "/bin/bash -c '${path.module}/exec.sh ${each.value}'" } }