Skip to content

Commit

Permalink
Remove owner role assignments from live test ARM templates (Azure#24236)
Browse files Browse the repository at this point in the history
* Remove owner role assignment from digital twins ARM template

* Update bicep file

Co-authored-by: Azad Abbasi <azabbasi@microsoft.com>
  • Loading branch information
benbp and azabbasi authored Sep 22, 2021
1 parent 0424300 commit 6d049e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
9 changes: 0 additions & 9 deletions sdk/digitaltwins/test-resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions sdk/digitaltwins/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.63.48766",
"templateHash": "14469093771711807520"
"templateHash": "7080001263714194046"
}
},
"parameters": {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6d049e6

Please sign in to comment.