ARM template fix (#75)
* Storage role fix * change the branch to dev * branch to dev * change the branch to main * Added dependancy of container creation before subscribing it in event grid --------- Co-authored-by: Shashank Narang <v-shnarang@microsoft.com> Co-authored-by: Ganesh Kuber <ganesh.kuber@xoriantcorp.onmicrosoft.com>
This commit is contained in:
Родитель
f367968252
Коммит
4ada68431d
|
@ -313,7 +313,7 @@ resource ndjsoncreated 'Microsoft.EventGrid/eventSubscriptions@2022-06-15' = {
|
|||
}
|
||||
|
||||
dependsOn: [
|
||||
storageAccount
|
||||
ndjson
|
||||
]
|
||||
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ resource bundlecreated 'Microsoft.EventGrid/eventSubscriptions@2022-06-15' = {
|
|||
}
|
||||
|
||||
dependsOn: [
|
||||
storageAccount
|
||||
bundles
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
@ -501,6 +501,48 @@
|
|||
"description": "Monitoring for Function App"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(variables('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b'))]",
|
||||
"scope": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort')))]",
|
||||
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}stor', variables('prefixNameCleanShort')))]"
|
||||
],
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b')]",
|
||||
"principalId": "[reference(resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort'))), '2021-03-01', 'full').identity.principalId]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(variables('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '17d1049b-9a84-46fb-8f53-869881c3d3ab'))]",
|
||||
"scope": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort')))]",
|
||||
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}stor', variables('prefixNameCleanShort')))]"
|
||||
],
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '17d1049b-9a84-46fb-8f53-869881c3d3ab')]",
|
||||
"principalId": "[reference(resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort'))), '2021-03-01', 'full').identity.principalId]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(variables('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))]",
|
||||
"scope": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort')))]",
|
||||
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}stor', variables('prefixNameCleanShort')))]"
|
||||
],
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')]",
|
||||
"principalId": "[reference(resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort'))), '2021-03-01', 'full').identity.principalId]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2022-09-01",
|
||||
|
@ -592,87 +634,6 @@
|
|||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort')))]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2022-09-01",
|
||||
"name": "role-assign-storage",
|
||||
"resourceGroup": "[variables('fhirResourceGroupName')]",
|
||||
"properties": {
|
||||
"expressionEvaluationOptions": {
|
||||
"scope": "inner"
|
||||
},
|
||||
"mode": "Incremental",
|
||||
"parameters": {
|
||||
"principalId": {
|
||||
"value": "[reference(resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort'))), '2021-03-01', 'full').identity.principalId]"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"value": "[variables('storageAccountName')]"
|
||||
},
|
||||
"storageAccountId": {
|
||||
"value": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"metadata": {
|
||||
"_generator": {
|
||||
"name": "bicep",
|
||||
"version": "0.21.1.54444",
|
||||
"templateHash": "3790216184586938451"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"principalId": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(parameters('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b'))]",
|
||||
"scope": "[parameters('storageAccountId')]",
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b')]",
|
||||
"principalId": "[parameters('principalId')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(parameters('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '17d1049b-9a84-46fb-8f53-869881c3d3ab'))]",
|
||||
"scope": "[parameters('storageAccountId')]",
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '17d1049b-9a84-46fb-8f53-869881c3d3ab')]",
|
||||
"principalId": "[parameters('principalId')]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.Authorization/roleAssignments",
|
||||
"apiVersion": "2022-04-01",
|
||||
"name": "[guid(parameters('storageAccountName'),subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88'))]",
|
||||
"scope": "[parameters('storageAccountId')]",
|
||||
"properties": {
|
||||
"roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '974c5e8b-45b9-4653-ba55-5f855dd0fb88')]",
|
||||
"principalId": "[parameters('principalId')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.Web/sites', format('{0}-func', variables('prefixNameCleanShort')))]",
|
||||
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Загрузка…
Ссылка в новой задаче