Complete the code to define an output named 'storageAccountName' in an ARM template.
"outputs": { "storageAccountName": { "type": "string", "value": [1] } }
The output value should reference the variable 'storageAccountName' using variables('storageAccountName').
Complete the code to output the resource ID of a storage account named 'myStorage'.
"outputs": { "storageAccountId": { "type": "string", "value": [1] } }
The resourceId function constructs the full resource ID for the storage account named 'myStorage'.
Fix the error in the output value that tries to return the primary connection string of a storage account resource.
"outputs": { "connectionString": { "type": "string", "value": [1] } }
The listKeys function requires the full resource ID as the first argument, followed by the API version. The correct syntax uses resourceId to get the resource ID.
Fill both blanks to output the public IP address of a resource named 'myPublicIP'.
"outputs": { "publicIPAddress": { "type": "string", "value": "[[1]('Microsoft.Network/publicIPAddresses', [2]).ipAddress]" } }
resourceId instead of reference for output value.The reference function is used to get the ipAddress property of the public IP resource. The resource name is stored in the variable 'publicIPName'.
Fill all three blanks to output a dictionary with the storage account name, resource group, and location.
"outputs": { "storageInfo": { "type": "object", "value": { "name": [1], "resourceGroup": [2], "location": [3] } } }
resourceGroup().The storage account name comes from a variable. The resource group name and location come from the resourceGroup() function.