From 3627e83b176ada77087a712a81f8247fcdb8f8a6 Mon Sep 17 00:00:00 2001 From: adhazel Date: Thu, 2 Feb 2023 14:46:41 -0600 Subject: [PATCH] Update azuredeploy.json 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 --- template/azuredeploy.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/azuredeploy.json b/template/azuredeploy.json index d19fec56..acf6b6b0 100644 --- a/template/azuredeploy.json +++ b/template/azuredeploy.json @@ -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'))]", @@ -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]", @@ -363,7 +363,7 @@ "location": "[parameters('location')]", "properties": { "hardwareProfile": { - "vmSize": "Standard_B2ms" + "vmSize": "Standard_D2ads_v5" }, "storageProfile": { "osDisk": { @@ -490,4 +490,4 @@ } } ] -} \ No newline at end of file +}