Complete the code to specify the AWS provider region.
provider "aws" { region = "[1]" }
The AWS provider requires a valid AWS region like us-west-2 to know where to deploy resources.
Complete the code to define a second AWS provider with an alias.
provider "aws" { region = "us-east-1" alias = "[1]" }
The alias east is used to distinguish this provider configuration from the default one.
Fix the error in the resource block to use the aliased provider.
resource "aws_s3_bucket" "example" { bucket = "my-bucket" provider = aws.[1] }
To use the aliased provider named east, specify provider = aws.east in the resource block.
Fill both blanks to configure two AWS providers with different regions and aliases.
provider "aws" { region = "[1]" alias = "[2]" }
The first provider uses region us-west-1 with alias west.
Fill all three blanks to create a resource using the aliased provider and specify the bucket name.
resource "aws_s3_bucket" "example" { bucket = "[1]" acl = "private" provider = aws.[2] tags = { Environment = "[3]" } }
The bucket name is my-app-bucket, the provider alias is east, and the environment tag is production.