Challenge - 5 Problems
Multi-Region Provider Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Configuration
intermediate2:00remaining
Identify the correct provider alias configuration for AWS multi-region
Given the need to deploy resources in two AWS regions using Terraform provider aliases, which configuration correctly defines the provider aliases for us-east-1 and us-west-2?
Attempts:
2 left
💡 Hint
Remember that each provider block for a different region must have a unique alias.
✗ Incorrect
Provider aliases must be explicitly set with the alias attribute. Both provider blocks need aliases to be referenced separately.
❓ service_behavior
intermediate2:00remaining
Determine the provider used for resource creation with aliases
Given the following Terraform resource and provider aliases, which provider configuration will be used to create the resource
aws_instance.example?Terraform
provider "aws" { region = "us-east-1" alias = "east" } provider "aws" { region = "us-west-2" alias = "west" } resource "aws_instance" "example" { provider = aws.west ami = "ami-12345678" instance_type = "t2.micro" }
Attempts:
2 left
💡 Hint
Check the provider attribute in the resource block.
✗ Incorrect
The resource explicitly uses provider = aws.west, which refers to the provider alias configured for us-west-2.
❓ Architecture
advanced3:00remaining
Best practice for managing multiple provider aliases in large Terraform projects
In a large Terraform project managing resources across multiple AWS regions, which approach best organizes provider aliases to ensure maintainability and clarity?
Attempts:
2 left
💡 Hint
Consider how to keep provider configurations centralized and reusable.
✗ Incorrect
Centralizing provider aliases in one file and referencing them in modules improves clarity and reduces duplication.
❓ security
advanced2:30remaining
Security implications of provider alias misconfiguration in multi-region deployments
What is a potential security risk if provider aliases are misconfigured in Terraform when deploying resources across multiple AWS regions?
Attempts:
2 left
💡 Hint
Think about where your resources actually get created.
✗ Incorrect
If provider aliases point to wrong regions, resources might be created where you don't expect, potentially exposing sensitive data or violating compliance.
🧠 Conceptual
expert3:00remaining
Understanding provider alias inheritance in nested modules
Consider a root Terraform module defining two AWS provider aliases:
east and west. A child module is called without explicitly passing providers. Which provider configuration will the child module use for AWS resources?Terraform
provider "aws" { region = "us-east-1" alias = "east" } provider "aws" { region = "us-west-2" alias = "west" } module "child" { source = "./child_module" # no providers passed explicitly } # Inside child_module, resource uses default provider aws
Attempts:
2 left
💡 Hint
Think about how provider inheritance works when no default provider is defined.
✗ Incorrect
When all providers in root have aliases and no default provider is defined, child modules expecting the default provider will fail unless providers are explicitly passed.