0
0
Azurecloud~10 mins

Why IaC matters on Azure - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define an Azure resource group using Infrastructure as Code (IaC).

Azure
resource_group = azurerm_resource_group(name=[1], location="eastus")
Drag options to blanks, or click blank then click option'
AmyResourceGroup
B"myResourceGroup"
CresourceGroup
D"eastus"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the resource group name.
Using the location value instead of the name.
2fill in blank
medium

Complete the code to specify the location for the Azure resource group.

Azure
resource_group = azurerm_resource_group(name="myResourceGroup", location=[1])
Drag options to blanks, or click blank then click option'
A"eastus"
Bwestus2
Ccentralus
Deastus
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the location string.
Using a location name that is not supported.
3fill in blank
hard

Fix the error in the code to create a storage account with IaC on Azure.

Azure
storage_account = azurerm_storage_account(name=[1], resource_group_name="myResourceGroup", location="eastus")
Drag options to blanks, or click blank then click option'
AstorageAccount
Bmystorageaccount
C"MyStorageAccount"
D"mystorageaccount"
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase letters in the storage account name.
Not putting the name in quotes.
4fill in blank
hard

Fill both blanks to define a virtual network and subnet in Azure IaC.

Azure
virtual_network = azurerm_virtual_network(name=[1], resource_group_name="myResourceGroup")
subnet = azurerm_subnet(name=[2], virtual_network_name=virtual_network.name, resource_group_name="myResourceGroup")
Drag options to blanks, or click blank then click option'
A"myVnet"
B"mySubnet"
C"vnet1"
D"subnet1"
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the names.
Using the same name for both virtual network and subnet.
5fill in blank
hard

Fill all three blanks to create an Azure App Service with correct parameters.

Azure
app_service = azurerm_app_service(name=[1], resource_group_name=[2], location=[3])
Drag options to blanks, or click blank then click option'
A"myAppService"
B"myResourceGroup"
C"eastus"
D"AppService1"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around any of the parameters.
Using inconsistent or invalid names.