Challenge - 5 Problems
Azure Provider Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Configuration
intermediate2:00remaining
Identify the correct Azure provider block for Terraform
Which Terraform configuration block correctly sets up the Azure provider with a specified subscription ID and tenant ID?
Attempts:
2 left
💡 Hint
The official Azure provider for Terraform is named 'azurerm' and requires a 'features' block.
✗ Incorrect
The correct provider block for Azure in Terraform is 'azurerm'. It requires a 'features' block even if empty. The correct attribute names are 'subscription_id' and 'tenant_id'. Option D uses the correct provider name, attributes, and includes the required 'features' block.
❓ service_behavior
intermediate2:00remaining
What happens if 'features' block is missing in Azure provider?
In Terraform, what is the result of configuring the Azure provider without including the 'features' block?
Attempts:
2 left
💡 Hint
The 'features' block is mandatory even if empty for the Azure provider.
✗ Incorrect
The Azure provider for Terraform requires a 'features' block. Omitting it causes Terraform to throw a configuration error during initialization.
❓ security
advanced2:30remaining
Securely authenticating Terraform Azure provider with Service Principal
Which Terraform provider configuration securely authenticates to Azure using a Service Principal with client ID, client secret, tenant ID, and subscription ID?
Attempts:
2 left
💡 Hint
Use exact attribute names: client_id, client_secret, tenant_id, subscription_id.
✗ Incorrect
The Azure provider expects the attributes named exactly as client_id, client_secret, tenant_id, and subscription_id. Option B uses the correct attribute names and includes the required features block.
❓ Architecture
advanced2:30remaining
Choosing the best Terraform backend for Azure state storage
Which Terraform backend configuration correctly sets up remote state storage in Azure Blob Storage with container 'tfstate' and storage account 'mystorageacct'?
Attempts:
2 left
💡 Hint
The backend type is 'azurerm' and the key must match the state file name.
✗ Incorrect
Option C correctly uses the 'azurerm' backend with all required attributes including resource group, storage account, container, and key matching the state file name. Option C uses a non-existent backend type. Option C omits the key attribute which is required. Option C uses a different key name than specified.
🧠 Conceptual
expert3:00remaining
Understanding Azure Provider Authentication Methods in Terraform
Which authentication method will Terraform use for the Azure provider if no explicit credentials are set in the provider block and environment variables are not defined?
Attempts:
2 left
💡 Hint
Terraform can use Azure CLI credentials if no other credentials are provided.
✗ Incorrect
When no credentials are set in the provider block or environment variables, Terraform attempts to authenticate using the Azure CLI logged-in user context. If the user is not logged in, it will fail later during resource operations. Managed Identity is only used if explicitly configured or running in certain environments.