Complete the code to define a provider with an alias for the us-east-1 region.
provider "aws" { region = "[1]" alias = "useast1" }
The alias is set for the us-east-1 region to enable multi-region usage.
Complete the resource block to use the aliased provider for us-east-1.
resource "aws_s3_bucket" "example" { provider = aws.[1] bucket = "my-bucket-us-east-1" acl = "private" }
The resource uses the aliased provider useast1 to deploy in the us-east-1 region.
Fix the error in the provider block by completing the missing alias.
provider "aws" { region = "eu-west-1" alias = "[1]" }
The alias should reflect the region name euwest1 to clearly identify the provider for eu-west-1.
Fill both blanks to define two providers with aliases for different regions.
provider "aws" { region = "[1]" alias = "uswest2" } provider "aws" { region = "[2]" alias = "apne1" }
The first provider is for us-west-2 with alias uswest2, and the second for ap-northeast-1 with alias apne1.
Fill all three blanks to create resources using aliased providers for multi-region deployment.
resource "aws_s3_bucket" "west_bucket" { provider = aws.[1] bucket = "my-bucket-west" acl = "private" } resource "aws_s3_bucket" "asia_bucket" { provider = aws.[2] bucket = "my-bucket-asia" acl = "private" } resource "aws_s3_bucket" "default_bucket" { provider = [3] bucket = "my-bucket-default" acl = "private" }
The first resource uses the uswest2 alias, the second uses apne1, and the third uses aws for the default provider.