Multiple providers ...
 
Notifications
Clear all

Multiple providers can be declared within a single Terraform configuration file.

1 Posts
1 Users
0 Likes
91 Views
(@mccroygalen)
Posts: 739
Noble Member
Topic starter
 

Multiple providers can be declared within a single Terraform configuration file.

  • A . True
    B. False

Show Answer Hide Answer

Suggested Answer: A

Explanation:

You can optionally define multiple configurations for the same provider, and select which one to use on a per-resource or per-module basis. The primary reason for this is to support multiple regions for a cloud platform; other examples include targeting multiple Docker hosts, multiple Consul hosts, etc.

To include multiple configurations for a given provider, include multiple provider blocks with the same provider name, but set the alias meta-argument to an alias name to use for each additional configuration.

For Example

# The default provider configuration provider "aws" {

region = "us-east-1"

}

# Additional provider configuration for west coast region provider "aws" {

alias = "west" region = "us-west-2"

}

The provider block without alias set is known as the default provider configuration. When alias is set, it creates an additional provider configuration. For providers that have no required configuration arguments, the implied empty configuration is considered to be the default provider configuration. https://www.terraform.io/docs/configuration/providers.html
 
Posted : 19/12/2022 4:47 pm

Latest TA-002-P V1 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: