Challenge - 5 Problems
AWS Provider Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Configuration
intermediate2:00remaining
Identify the correct AWS provider configuration for a specific region
Which AWS provider configuration will correctly set the region to us-west-2 and use the default profile from your AWS credentials file?
Attempts:
2 left
💡 Hint
Remember that region and profile values must be strings enclosed in quotes.
✗ Incorrect
Option C correctly sets the region and profile as strings. Option C misses quotes causing syntax errors. Option C incorrectly uses access_key instead of profile. Option C uses a wrong profile name.
❓ service_behavior
intermediate2:00remaining
Determine the effect of missing AWS provider region in Terraform
What happens if you configure the AWS provider in Terraform without specifying a region and no environment variables or default region are set?
Attempts:
2 left
💡 Hint
Think about what Terraform requires to know where to deploy resources.
✗ Incorrect
Terraform requires an explicit region setting either in provider config, environment variables, or default config. Without it, it errors out.
❓ security
advanced2:00remaining
Choose the safest way to provide AWS credentials to Terraform
Which option is the most secure and recommended way to provide AWS credentials to Terraform when running on a developer's local machine?
Attempts:
2 left
💡 Hint
Think about avoiding exposing secrets in code or version control.
✗ Incorrect
Using AWS CLI profiles keeps credentials out of code and version control, making it safer. Environment variables are better than hardcoding but can leak. Hardcoding and storing in variables file are insecure.
❓ Architecture
advanced2:00remaining
Select the correct Terraform AWS provider configuration for multi-account setup
You manage multiple AWS accounts and want to deploy resources to two accounts using Terraform. Which provider configuration allows you to switch between accounts using profiles named 'dev' and 'prod'?
Attempts:
2 left
💡 Hint
Think about how Terraform handles multiple provider configurations with aliases.
✗ Incorrect
Option B correctly defines two providers with aliases for different profiles. Option B tries to combine profiles in one provider which is invalid. Option B misses aliases so Terraform cannot distinguish providers. Option B uses a non-existent combined profile.
🧠 Conceptual
expert2:00remaining
Understand the impact of provider version constraints in Terraform AWS provider
Given the following Terraform provider block, what is the effect of the version constraint on provider installation and upgrades?
provider "aws" {
version = ">= 4.0, < 5.0"
region = "us-east-1"
}
Attempts:
2 left
💡 Hint
Think about semantic versioning and how version constraints work in Terraform.
✗ Incorrect
The constraint ">= 4.0, < 5.0" means any version starting at 4.0 up to but not including 5.0 is allowed. This allows safe upgrades without breaking changes from major version bumps.