Created
September 4, 2023 07:51
-
-
Save identw/a4681b9faa00da3858d9784b9b507683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
globals { | |
providers = ["name1", "name2"] | |
} | |
generate_hcl "example.tf" { | |
content { | |
tm_dynamic "resource1" { | |
for_each = tm_toset(global.providers) | |
iterator = i | |
content { | |
provider = i.value | |
} | |
} | |
tm_dynamic "resource2" { | |
for_each = tm_toset(global.providers) | |
iterator = i | |
content { | |
provider = i.value | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment