4 ms·
What do you mean by 'dynamically render providers'? I assume you're aware you can instantiate multiple versions (different params) of a provider and pass them
by OJFord 3y ago
What do you mean by 'dynamically render providers'?
I assume you're aware you can instantiate multiple versions (different params) of a provider and pass them to child modules, e.g. you can instantiate a module once for each of a several AWS regions/accounts?
Do you mean that something like the region/account param would be set on the basis of a computed value from some other resource (because we created the account, say, or listed all regions satisfying some filter with a data source)?
- 333throwaway342 3y agoproviders do not support `for_each` or `count`
- deleted 3y ago[deleted]
- linuxdude314 3y agoLet's say you need to configure a provider for 3 different regions. The natural way you want to do this is store the regions in a variable, and iterate over the variable using "for_each". What you are referring to are called "provider aliases" and they work well for _avoiding_ using terragrunt (not very DRY though).