Same provider different configurations
An common use case scenario deploy similar resources using distinct placements for some Cloud Providers can be translated in distinct regions, resources, local isolations.
As an consequence an very common technique to avoid single point of failures, with this on mind…
The meta-argument alias can be used to create an second configuration block for the same provider. Resulting:
The first provider, without the alias will be the default provider configuration.
The second provider block with the alias will be that will have the distinct configuration will be the alternate.
Default Provider
Custom Provider Configuration
How to reference the resource
The block above has the meta-argument “oci.home” in this resource.
This sample on OCI can illustrate better this scenario because:
IAM resources need to be created at tenancy home region. The ability to subscribe to any region to deploy services to any region in some deployments can create an requirement to adjust global constructs that must be updated on tenancy home regions for example.