From 2324c91a443b8bebbdbffbc3f57534b7ae60a7f9 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Tue, 21 Sep 2021 16:07:56 -0400 Subject: [PATCH 1/2] Remove owner role assignment from digital twins ARM template --- sdk/digitaltwins/test-resources.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sdk/digitaltwins/test-resources.json b/sdk/digitaltwins/test-resources.json index 1664a25e61bd2..c244dd5edb02f 100644 --- a/sdk/digitaltwins/test-resources.json +++ b/sdk/digitaltwins/test-resources.json @@ -34,19 +34,9 @@ }, "functions": [], "variables": { - "rbacOwnerRoleDefinitionId": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635', subscription().subscriptionId)]", "adtOwnerRoleDefinitionId": "[format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/bcd981a7-7f74-457b-83e1-cceb9e632ffe', subscription().subscriptionId)]" }, "resources": [ - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2018-09-01-preview", - "name": "[guid(resourceGroup().id)]", - "properties": { - "roleDefinitionId": "[variables('rbacOwnerRoleDefinitionId')]", - "principalId": "[parameters('testApplicationOid')]" - } - }, { "type": "Microsoft.DigitalTwins/digitalTwinsInstances", "apiVersion": "2020-03-01-preview", @@ -150,4 +140,4 @@ "value": "[format('https://{0}', reference(resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('baseName'))).hostName)]" } } -} \ No newline at end of file +} From fb2f5e4fa4aa0445dedaeab23bc2f90507a712e7 Mon Sep 17 00:00:00 2001 From: Azad Abbasi Date: Wed, 22 Sep 2021 10:41:21 -0700 Subject: [PATCH 2/2] Update bicep file --- sdk/digitaltwins/test-resources.bicep | 9 --------- sdk/digitaltwins/test-resources.json | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sdk/digitaltwins/test-resources.bicep b/sdk/digitaltwins/test-resources.bicep index 3868d3b9420cd..17578827e6416 100644 --- a/sdk/digitaltwins/test-resources.bicep +++ b/sdk/digitaltwins/test-resources.bicep @@ -9,17 +9,8 @@ param baseName string = resourceGroup().name @description('The location of the resource. By default, this is the same as the resource group.') param location string = resourceGroup().location -var rbacOwnerRoleDefinitionId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635' var adtOwnerRoleDefinitionId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/bcd981a7-7f74-457b-83e1-cceb9e632ffe' -resource roleAssignment 'Microsoft.Authorization/roleAssignments@2018-09-01-preview' = { - name: guid(resourceGroup().id) - properties: { - roleDefinitionId: rbacOwnerRoleDefinitionId - principalId: testApplicationOid - } -} - resource digitaltwin 'Microsoft.DigitalTwins/digitalTwinsInstances@2020-03-01-preview' = { name: baseName location: location diff --git a/sdk/digitaltwins/test-resources.json b/sdk/digitaltwins/test-resources.json index c244dd5edb02f..bec784dcde9da 100644 --- a/sdk/digitaltwins/test-resources.json +++ b/sdk/digitaltwins/test-resources.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.4.63.48766", - "templateHash": "14469093771711807520" + "templateHash": "7080001263714194046" } }, "parameters": { @@ -140,4 +140,4 @@ "value": "[format('https://{0}', reference(resourceId('Microsoft.DigitalTwins/digitalTwinsInstances', parameters('baseName'))).hostName)]" } } -} +} \ No newline at end of file