When using multiple configurations of the same Terraform provider, what meta-argument must be included in any non-default provider configurations?
When using multiple configurations of the same Terraform provider, what meta-argument must be included in any non-default provider configurations?
When using multiple configurations of the same Terraform provider, the meta-argument 'alias' must be included in any non-default provider configurations. This allows Terraform to distinguish between the multiple provider instances and ensure that the correct configuration is used for the appropriate resources.
https://developer.hashicorp.com/terraform/language/providers/configuration#alias-multiple-provider-configurations
To create multiple configurations for a given provider, include multiple provider blocks with the same provider name. For each additional non-default configuration, use the alias meta-argument to provide an extra name segment.
https://developer.hashicorp.com/terraform/language/meta-arguments/resource-provider The provider meta-argument specifies which provider configuration to use for a resource, overriding Terraform's default behavior of selecting one based on the resource type name. Its value should be an unquoted <PROVIDER>.<ALIAS> reference. # default configuration provider "google" { region = "us-central1" } # alternate configuration, whose alias is "europe" provider "google" { alias = "europe" region = "europe-west1" }