File tree Expand file tree Collapse file tree
modules/virtual-machine-windows/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ param resource string
3333// VARIABLES
3434// ---------
3535
36+ // Map of common RBAC role names to their IDs.
37+ // Azure uses specific GUIDs for built-in roles however it is easier to reference them by name.
3638var roles = {
3739 Owner : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , '8e3af657-a8ff-443c-a75c-2fe8c4bcb635' )
3840 Contributor : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , 'b24988ac-6180-42a0-ab88-20f7382dd24c' )
@@ -46,9 +48,8 @@ var roles = {
4648 '9980e02c-c2be-4d73-94e8-173b1dc7cf3c'
4749 )
4850}
49- var roleDefinitionId = contains (roles , role )
50- ? roles [role ]
51- : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , role )
51+
52+ var roleDefinitionId = roles [?role ] ?? subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , role )
5253
5354// ---------
5455// RESOURCES
Original file line number Diff line number Diff line change 33
44// Create or update a Virtual Machine
55targetScope = 'resourceGroup'
6+
67metadata name = 'Virtual Machine - Windows Server'
78metadata description = 'Deploys and configures a Windows Server Virtual Machine. VM will automatically domain join and configure monitoring.'
89metadata version = '1.0.0'
You can’t perform that action at this time.
0 commit comments