Challenge - 5 Problems
Azure Storage Backend Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Configuration
intermediate2:00remaining
Identify the correct Terraform backend configuration for Azure Storage
Which option correctly configures Terraform to use an Azure Storage Account as the backend with container 'tfstate' and key 'prod.terraform.tfstate'?
Attempts:
2 left
💡 Hint
Check the exact backend type name and parameter names required by Terraform for Azure Storage backend.
✗ Incorrect
Terraform requires the backend type to be 'azurerm' with parameters named exactly: resource_group_name, storage_account_name, container_name, and key. Option B matches these requirements exactly.
❓ service_behavior
intermediate2:00remaining
What happens if the Azure Storage backend container does not exist?
When Terraform initializes with an Azure Storage backend and the specified container does not exist, what is the expected behavior?
Attempts:
2 left
💡 Hint
Consider whether Terraform manages Azure Storage containers automatically.
✗ Incorrect
Terraform does not create the container automatically. If the container does not exist, initialization fails with an error. The container must be created beforehand.
❓ security
advanced2:00remaining
Securely configuring access to Azure Storage backend
Which option is the most secure way to provide credentials for Terraform to access the Azure Storage backend?
Attempts:
2 left
💡 Hint
Think about best practices for managing secrets and automation.
✗ Incorrect
Using environment variables with a service principal is secure and supports automation. Hardcoding secrets or SAS tokens in files is insecure. Azure CLI credentials may not work in automation contexts.
❓ Architecture
advanced2:00remaining
Designing a multi-environment Terraform state backend in Azure Storage
You want to manage multiple environments (dev, staging, prod) using a single Azure Storage account for Terraform state. Which backend configuration approach correctly isolates state files per environment?
Attempts:
2 left
💡 Hint
Consider how Terraform identifies state files uniquely in the backend.
✗ Incorrect
Using the same container with different keys per environment isolates state files properly. Using the same key or container for all environments causes conflicts. Different storage accounts is possible but more complex.
🧠 Conceptual
expert2:00remaining
Understanding Terraform state locking with Azure Storage backend
How does Terraform ensure that only one user or process modifies the remote state at a time when using Azure Storage backend?
Attempts:
2 left
💡 Hint
Think about how Azure Blob Storage supports concurrency control.
✗ Incorrect
Terraform uses the blob lease feature of Azure Blob Storage to lock the state file during operations, preventing concurrent modifications.