Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
added roleAssignment to fix missing IAM priv
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseloudon committed Mar 19, 2021
1 parent 9d4c98e commit ecb8adb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ resource bicepExampleAssignment 'Microsoft.Authorization/policyAssignments@2020-
}
]
}
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
name: guid(bicepExampleAssignment.name, bicepExampleAssignment.type, subscription().subscriptionId)
properties: {
principalId: bicepExampleAssignment.identity.principalId
roleDefinitionId: '/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c' // contributor RBAC role for deployIfNotExists effect
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,25 @@
}
]
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"name": "[guid('bicepExampleAssignment', 'Microsoft.Authorization/policyAssignments', subscription().subscriptionId)]",
"properties": {
"principalId": "[reference(subscriptionResourceId('Microsoft.Authorization/policyAssignments', 'bicepExampleAssignment'), '2020-09-01', 'full').identity.principalId]",
"roleDefinitionId": "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
},
"dependsOn": [
"[subscriptionResourceId('Microsoft.Authorization/policyAssignments', 'bicepExampleAssignment')]"
]
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "7870791294115762722"
"templateHash": "10825597900789147201"
}
}
}

0 comments on commit ecb8adb

Please sign in to comment.