Created
September 4, 2023 08:10
-
-
Save identw/b9c288abd5f5c8cbddff7b31715de043 to your computer and use it in GitHub Desktop.
terramate example tm_dynamic how to generate few resources for each provider
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