provider alias

A second, named configuration of the same provider, used when one configuration must talk to two regions or accounts.

In more detail

You write a second provider block with an alias argument, then point individual resources or modules at it with provider = aws.<alias>. Resources without that argument use the default configuration.

Example

provider "aws" {
  alias  = "ireland"
  region = "eu-west-1"
}

Related terms

Taught in

References

Certification courses