Complete the code to specify the Azure region for resource deployment.
resource_group = azurerm_resource_group('example', location='[1]')
The location parameter sets the Azure region where resources are deployed. westus2 is a valid Azure region.
Complete the code to specify an availability zone in the Azure region.
vm = azurerm_virtual_machine('vm1', location='westus2', zone='[1]')
Azure availability zones are identified by numbers like 1, 2, or 3. The correct way to specify a zone is by its number.
Fix the error in the code to correctly deploy a resource in an Azure availability zone.
storage_account = azurerm_storage_account('storage1', location='westus2', zone='[1]')
The zone parameter must be a number representing the availability zone. Using '2' is correct, while 'zone2' or other strings cause errors.
Fill both blanks to create a resource group and specify its Azure region and availability zone.
resource_group = azurerm_resource_group('rg1', location='[1]') vm = azurerm_virtual_machine('vm1', location='[2]', zone='1')
The resource group is created in eastus2 and the VM is deployed in westus region with zone 1. Regions must be valid Azure locations.
Fill all three blanks to define a VM with a specific region, availability zone, and resource group location.
resource_group = azurerm_resource_group('rg2', location='[1]') vm = azurerm_virtual_machine('vm2', location='[2]', zone='[3]')
The resource group is in eastus, the VM is deployed in westus2 region, and availability zone 1 is specified for high availability.