|
| 1 | +name: RoleManagementPolicy |
| 2 | +runtime: yaml |
| 3 | + |
| 4 | +resources: |
| 5 | + exampleResourceGroup: |
| 6 | + type: azure:core:ResourceGroup |
| 7 | + properties: |
| 8 | + location: East US |
| 9 | + |
| 10 | + policy: |
| 11 | + type: azure:pim:RoleManagementPolicy |
| 12 | + properties: |
| 13 | + scope: /subscriptions/06414010-48ba-4c6f-ac65-479ecad05c44/resourceGroups/${exampleResourceGroup.name} |
| 14 | + roleDefinitionId: "/subscriptions/06414010-48ba-4c6f-ac65-479ecad05c44/providers/Microsoft.Authorization/roleDefinitions/roleDefinition.id" |
| 15 | + activeAssignmentRules: |
| 16 | + expirationRequired: false |
| 17 | + eligibleAssignmentRules: |
| 18 | + expirationRequired: false |
| 19 | + activationRules: |
| 20 | + requireApproval: true |
| 21 | + approvalStage: |
| 22 | + primaryApprovers: |
| 23 | + - objectId: 06414010-48ba-4c6f-ac65-479ecad05c44 |
| 24 | + type: Group |
| 25 | + notificationRules: |
| 26 | + activeAssignments: |
| 27 | + adminNotifications: |
| 28 | + notificationLevel: All |
| 29 | + defaultRecipients: true |
| 30 | + eligibleAssignments: |
| 31 | + adminNotifications: |
| 32 | + notificationLevel: All |
| 33 | + defaultRecipients: true |
| 34 | + eligibleActivations: |
| 35 | + adminNotifications: |
| 36 | + notificationLevel: All |
| 37 | + defaultRecipients: true |
| 38 | +# request from issue, missing expected Expiration_Admin_Assignment: |
| 39 | +# { |
| 40 | +# "id": "/subscriptions/<subscription-id>/resourceGroups/test-weu-fnd-jump-box-tmp0371/providers/Microsoft.Compute/virtualMachines/vm-test-weu-fnd-jump-box-tmp0371/providers/Microsoft.Authorization/roleManagementPolicies/1c0163c0-47e6-4577-8991-ea5c82e286e4", |
| 41 | +# "name": "1c0163c0-47e6-4577-8991-ea5c82e286e4", |
| 42 | +# "properties": |
| 43 | +# { |
| 44 | +# "rules": |
| 45 | +# [ |
| 46 | +# { |
| 47 | +# "id": "Expiration_Admin_Eligibility", |
| 48 | +# "isExpirationRequired": false, |
| 49 | +# "maximumDuration": "P365D", |
| 50 | +# "ruleType": "RoleManagementPolicyExpirationRule", |
| 51 | +# "target": |
| 52 | +# { |
| 53 | +# "caller": "Admin", |
| 54 | +# "enforcedSettings": [], |
| 55 | +# "inheritableSettings": [], |
| 56 | +# "level": "Eligibility", |
| 57 | +# "operations": ["All"], |
| 58 | +# "targetObjects": [], |
| 59 | +# }, |
| 60 | +# }, |
| 61 | +# { |
| 62 | +# "id": "Approval_EndUser_Assignment", |
| 63 | +# "ruleType": "RoleManagementPolicyApprovalRule", |
| 64 | +# "setting": |
| 65 | +# { |
| 66 | +# "approvalMode": "SingleStage", |
| 67 | +# "approvalStages": |
| 68 | +# [ |
| 69 | +# { |
| 70 | +# "primaryApprovers": |
| 71 | +# [{ "id": "<group-id>", "userType": "Group" }], |
| 72 | +# }, |
| 73 | +# ], |
| 74 | +# "isApprovalRequired": true, |
| 75 | +# "isApprovalRequiredForExtension": false, |
| 76 | +# "isRequestorJustificationRequired": true, |
| 77 | +# }, |
| 78 | +# "target": |
| 79 | +# { |
| 80 | +# "caller": "EndUser", |
| 81 | +# "enforcedSettings": [], |
| 82 | +# "inheritableSettings": [], |
| 83 | +# "level": "Assignment", |
| 84 | +# "operations": ["All"], |
| 85 | +# "targetObjects": [], |
| 86 | +# }, |
| 87 | +# }, |
| 88 | +# { |
| 89 | +# "id": "Notification_Admin_Admin_Eligibility", |
| 90 | +# "isDefaultRecipientsEnabled": true, |
| 91 | +# "notificationLevel": "Critical", |
| 92 | +# "notificationType": "Email", |
| 93 | +# "recipientType": "Admin", |
| 94 | +# "ruleType": "RoleManagementPolicyNotificationRule", |
| 95 | +# "target": |
| 96 | +# { |
| 97 | +# "caller": "Admin", |
| 98 | +# "enforcedSettings": [], |
| 99 | +# "inheritableSettings": [], |
| 100 | +# "level": "Eligibility", |
| 101 | +# "operations": ["All"], |
| 102 | +# "targetObjects": [], |
| 103 | +# }, |
| 104 | +# }, |
| 105 | +# { |
| 106 | +# "id": "Notification_Admin_Admin_Assignment", |
| 107 | +# "isDefaultRecipientsEnabled": true, |
| 108 | +# "notificationLevel": "Critical", |
| 109 | +# "notificationType": "Email", |
| 110 | +# "recipientType": "Admin", |
| 111 | +# "ruleType": "RoleManagementPolicyNotificationRule", |
| 112 | +# "target": |
| 113 | +# { |
| 114 | +# "caller": "Admin", |
| 115 | +# "enforcedSettings": [], |
| 116 | +# "inheritableSettings": [], |
| 117 | +# "level": "Assignment", |
| 118 | +# "operations": ["All"], |
| 119 | +# "targetObjects": [], |
| 120 | +# }, |
| 121 | +# }, |
| 122 | +# { |
| 123 | +# "id": "Notification_Admin_EndUser_Assignment", |
| 124 | +# "isDefaultRecipientsEnabled": true, |
| 125 | +# "notificationLevel": "Critical", |
| 126 | +# "notificationType": "Email", |
| 127 | +# "recipientType": "Admin", |
| 128 | +# "ruleType": "RoleManagementPolicyNotificationRule", |
| 129 | +# "target": |
| 130 | +# { |
| 131 | +# "caller": "EndUser", |
| 132 | +# "enforcedSettings": [], |
| 133 | +# "inheritableSettings": [], |
| 134 | +# "level": "Assignment", |
| 135 | +# "operations": ["All"], |
| 136 | +# "targetObjects": [], |
| 137 | +# }, |
| 138 | +# }, |
| 139 | +# ], |
| 140 | +# }, |
| 141 | +# "type": "Microsoft.Authorization/roleManagementPolicies", |
| 142 | +# } |
0 commit comments