Hi I am writing ARM templates to deploy my app service. I want to create system identity in my arm template. In app service arm template section I have below code.
"identity": {
"principalId": "[reference(variables('identity_resource_id'), '2017-12-01', 'Full').identity.principalId]",
"tenantId": "[parameters('tenantId')]",
"type": "SystemAssigned"
}
Then in variable section I added
"appServiceNameFrontEnd": "[concat(variables('defaultConvention'),'03-','FrontEnd')]"
"identity_resource_id": "[concat(resourceId('Microsoft.Web/sites', variables('appServiceNameFrontEnd')), '/providers/Microsoft.ManagedIdentity/Identities/default')]"
Whenever I tried to run this I get below error
##[error]Deployment template validation failed: 'The template resource 'FrontEnd' at line '1' and column '10436' is not valid: The template function 'reference' is not expected at this location. Please see https://aka.ms/arm-template-expressions for usage details..
Can someone help me how can I get system assigned identity? Any help would be greatly appreciated. Thank you