Complete the code to define a resource type in the ARM template resources section.
"resources": [ { "type": "[1]", "apiVersion": "2021-04-01", "name": "myStorageAccount" } ]
The type field specifies the resource type. For a storage account, it must be Microsoft.Storage/storageAccounts.
Complete the code to specify the API version for the resource.
"resources": [ { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "[1]", "name": "myStorageAccount" } ]
The apiVersion must be a valid and recent version supported by Azure for the resource type. '2021-04-01' is a valid API version for storage accounts.
Fix the error in the resource name property to correctly reference a parameter named 'storageName'.
"resources": [ { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2021-04-01", "name": "[1]" } ]
In ARM templates, to reference a parameter, use the expression syntax: [parameters('parameterName')].
Fill both blanks to define the location and sku name for the storage account resource.
"resources": [ { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2021-04-01", "name": "[parameters('storageName')]", "location": "[1]", "sku": { "name": "[2]" } } ]
The location is usually set from a parameter for flexibility, and the sku name defines the storage account type, such as 'Standard_LRS'.
Fill all three blanks to add tags with environment and department to the storage account resource.
"resources": [ { "type": "Microsoft.Storage/storageAccounts", "apiVersion": "2021-04-01", "name": "[parameters('storageName')]", "location": "[parameters('location')]", "sku": { "name": "Standard_LRS" }, "tags": { "environment": "[1]", "department": "[2]", "owner": "[3]" } } ]
Tags can be set using parameters for flexibility or hardcoded values. Here, environment and owner use parameters, and department is hardcoded as 'finance'.