Created
February 4, 2019 16:52
-
-
Save noelbundick/9b40aa88d8e7e5c54ceb2cd2a3d4eb56 to your computer and use it in GitHub Desktop.
Subscription role assignment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"utilityIdentityId": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"contributorRoleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", | |
"utilityRoleAssignmentId": "[guid(concat(subscription().id, 'contributor'))]" | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Authorization/roleAssignments", | |
"apiVersion": "2015-07-01", | |
"name": "[variables('utilityRoleAssignmentId')]", | |
"properties": { | |
"roleDefinitionId": "[variables('contributorRoleDefinitionId')]", | |
"principalId": "[reference(parameters('utilityIdentityId'), '2015-08-31-preview').principalId]", | |
"scope": "[subscription().id]" | |
} | |
} | |
], | |
"outputs": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment