@@ -821,6 +821,125 @@ variable "custom_role_definitions_bicep" {
821821 }
822822}
823823
824+ variable "custom_role_definitions_bicep_classic" {
825+ description = <<- EOT
826+ **(Optional)** Custom Azure RBAC role definitions for Bicep-based deployments.
827+
828+ Map of role definition configurations where:
829+ - **Key**: Role identifier (e.g., 'alz_management_group_contributor')
830+ - **Value**: Object containing:
831+ - `name` (string) - Display name (supports template variables like {{service_name}})
832+ - `description` (string) - Role purpose description
833+ - `permissions` (object):
834+ - `actions` (list(string)) - Allowed Azure actions
835+ - `not_actions` (list(string)) - Denied Azure actions
836+
837+ Default includes 4 predefined roles:
838+ - `alz_management_group_contributor` - Manage management group hierarchy and governance
839+ - `alz_management_group_reader` - Run Bicep What-If validations (requires --validation-level providerNoRbac flag)
840+ - `alz_subscription_owner` - Full access to platform subscriptions
841+ - `alz_subscription_reader` - Run Bicep What-If for subscription deployments
842+
843+ See default value for complete role action definitions.
844+ EOT
845+ type = map (object ({
846+ name = string
847+ description = string
848+ permissions = object ({
849+ actions = list (string )
850+ not_actions = list (string )
851+ })
852+ }))
853+ default = {
854+ alz_management_group_contributor = {
855+ name = " Azure Landing Zones Management Group Contributor ({{service_name}}-{{environment_name}})"
856+ description = " This is a custom role created by the Azure Landing Zones Accelerator for Writing the Management Group Structure."
857+ permissions = {
858+ actions = [
859+ " Microsoft.Management/managementGroups/delete" ,
860+ " Microsoft.Management/managementGroups/read" ,
861+ " Microsoft.Management/managementGroups/subscriptions/delete" ,
862+ " Microsoft.Management/managementGroups/subscriptions/write" ,
863+ " Microsoft.Management/managementGroups/write" ,
864+ " Microsoft.Management/managementGroups/subscriptions/read" ,
865+ " Microsoft.Management/managementGroups/settings/read" ,
866+ " Microsoft.Management/managementGroups/settings/write" ,
867+ " Microsoft.Management/managementGroups/settings/delete" ,
868+ " Microsoft.Authorization/policyDefinitions/write" ,
869+ " Microsoft.Authorization/policySetDefinitions/write" ,
870+ " Microsoft.Authorization/policyAssignments/write" ,
871+ " Microsoft.Authorization/roleDefinitions/write" ,
872+ " Microsoft.Authorization/*/read" ,
873+ " Microsoft.Resources/deployments/whatIf/action" ,
874+ " Microsoft.Resources/deployments/write" ,
875+ " Microsoft.Resources/deployments/validate/action" ,
876+ " Microsoft.Resources/deployments/read" ,
877+ " Microsoft.Resources/deployments/operationStatuses/read" ,
878+ " Microsoft.Authorization/roleAssignments/write" ,
879+ " Microsoft.Authorization/roleAssignments/delete" ,
880+ " Microsoft.Insights/diagnosticSettings/write"
881+ ]
882+ not_actions = []
883+ }
884+ }
885+ alz_management_group_reader = {
886+ name = " Azure Landing Zones Management Group What If ({{service_name}}-{{environment_name}})"
887+ description = " This is a custom role created by the Azure Landing Zones Accelerator for running Bicep What If for the Management Group Structure."
888+ permissions = {
889+ actions = [
890+ " Microsoft.Management/managementGroups/read" ,
891+ " Microsoft.Management/managementGroups/subscriptions/read" ,
892+ " Microsoft.Management/managementGroups/settings/read" ,
893+ " Microsoft.Authorization/*/read" ,
894+ " Microsoft.Authorization/policyDefinitions/write" ,
895+ " Microsoft.Authorization/policySetDefinitions/write" ,
896+ " Microsoft.Authorization/roleDefinitions/write" ,
897+ " Microsoft.Authorization/policyAssignments/write" ,
898+ " Microsoft.Insights/diagnosticSettings/write" ,
899+ " Microsoft.Insights/diagnosticSettings/read" ,
900+ " Microsoft.Resources/deployments/whatIf/action" ,
901+ " Microsoft.Resources/deployments/write"
902+ ]
903+ not_actions = []
904+ }
905+ }
906+ alz_subscription_owner = {
907+ name = " Azure Landing Zones Subscription Owner ({{service_name}}-{{environment_name}})"
908+ description = " This is a custom role created by the Azure Landing Zones Accelerator for Writing in platform subscriptions."
909+ permissions = {
910+ actions = [
911+ " *" ,
912+ " Microsoft.Resources/deployments/whatIf/action" ,
913+ " Microsoft.Resources/deployments/write"
914+ ]
915+ not_actions = []
916+ }
917+ }
918+ alz_subscription_reader = {
919+ name = " Azure Landing Zones Subscription What If ({{service_name}}-{{environment_name}})"
920+ description = " This is a custom role created by the Azure Landing Zones Accelerator for running Bicep What If for the platform subscriptions."
921+ permissions = {
922+ actions = [
923+ " */read" ,
924+ " Microsoft.Resources/subscriptions/resourceGroups/write" ,
925+ " Microsoft.ManagedIdentity/userAssignedIdentities/write" ,
926+ " Microsoft.Automation/automationAccounts/write" ,
927+ " Microsoft.OperationalInsights/workspaces/write" ,
928+ " Microsoft.OperationalInsights/workspaces/linkedServices/write" ,
929+ " Microsoft.OperationsManagement/solutions/write" ,
930+ " Microsoft.Insights/dataCollectionRules/write" ,
931+ " Microsoft.Authorization/locks/write" ,
932+ " Microsoft.Network/*/write" ,
933+ " Microsoft.Resources/deployments/whatIf/action" ,
934+ " Microsoft.Resources/deployments/write" ,
935+ " Microsoft.SecurityInsights/onboardingStates/write"
936+ ]
937+ not_actions = []
938+ }
939+ }
940+ }
941+ }
942+
824943variable "role_assignments_terraform" {
825944 description = <<- EOT
826945 **(Optional)** RBAC role assignments for Terraform-based deployments.
0 commit comments