Skip to content

Commit

Permalink
Update azuredeploy.json
Browse files Browse the repository at this point in the history
Changed vmSize due to the old one not being available in West US 2. The new one (Standard D2ads_v5) appears to be available broadly
Make changes that allow this deployment to be ran more than once in a given resource group: 
1. Changed the role assignment guid from guid of RG to guid of RG+Deployment name
2. Changed randomString variable assignment to use substring of the guid (instead of just the RG) to be a substring of the guid of the RG+Deployment name
  • Loading branch information
adhazel authored Feb 2, 2023
1 parent 56a24cb commit 3627e83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"variables": {
"location": "[resourceGroup().location]",
"randomString": "[substring(guid(resourceGroup().id), 0, 6)]",
"randomString": "[substring(guid(resourceGroup().id, deployment().name), 0, 6)]",
"roleDefinitionprefix": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions', subscription().subscriptionId)]",
"role": {
"Owner": "[format('{0}/8e3af657-a8ff-443c-a75c-2fe8c4bcb635', variables('roleDefinitionprefix'))]",
Expand Down Expand Up @@ -194,7 +194,7 @@
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-08-01-preview",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}', format('pvlab{0}synapse', variables('randomString')))]",
"name": "[guid(resourceGroup().id)]",
"name": "[guid(resourceGroup().id, deployment().name)]",
"properties": {
"principalId": "[reference(format('pvlab-{0}-synapse', variables('randomString')), '2021-05-01', 'full').identity.principalId]",
"roleDefinitionId": "[variables('role').StorageBlobDataContributor]",
Expand Down Expand Up @@ -363,7 +363,7 @@
"location": "[parameters('location')]",
"properties": {
"hardwareProfile": {
"vmSize": "Standard_B2ms"
"vmSize": "Standard_D2ads_v5"
},
"storageProfile": {
"osDisk": {
Expand Down Expand Up @@ -490,4 +490,4 @@
}
}
]
}
}

0 comments on commit 3627e83

Please sign in to comment.