Skip to content

Commit e53ac48

Browse files
committed
add role assignments to arm
1 parent d80c64f commit e53ac48

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

deployment/AzureDeploymentTemplate.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,19 @@
241241
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
242242
"functionAppRegion": "[resourceGroup().location]"
243243
}
244+
},
245+
{
246+
"type": "Microsoft.Authorization/roleAssignments",
247+
"apiVersion": "2022-04-01",
248+
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
249+
"dependsOn": [
250+
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
251+
],
252+
"properties": {
253+
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
254+
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
255+
"scope": "[resourceGroup().id]"
256+
}
244257
}
245258
],
246259
"outputs": {}

deployment/AzureDeploymentTemplate_regionoptions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,19 @@
241241
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
242242
"functionAppRegion": "[resourceGroup().location]"
243243
}
244+
},
245+
{
246+
"type": "Microsoft.Authorization/roleAssignments",
247+
"apiVersion": "2022-04-01",
248+
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
249+
"dependsOn": [
250+
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
251+
],
252+
"properties": {
253+
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
254+
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
255+
"scope": "[resourceGroup().id]"
256+
}
244257
}
245258
],
246259
"outputs": {}

0 commit comments

Comments
 (0)