Azure Subscription Configuration
br/innofactor:avm/ptn/lz/subscription-configuration:0.1.12
Overview
Subscription Configuration Module
This module provides a standardized approach to configuring an Azure subscription with baseline settings to ensure security, governance, and cost management best practices. It simplifies subscription deployment by automating the configuration of key services, ensuring compliance with enterprise standards.
Features Implemented
- Microsoft Defender for Cloud (Optional): Enables security monitoring with configurable settings.
- Partner Attribution: Supports telemetry for partner solutions.
- Partner Attribution Link
- Budget & Cost Alerts (Optional): Configures budget monitoring and email-based cost alerts.
- Resource Provider Registration (Optional): Registers required resource providers based on provided input.
- Management Group Placement (Optional): Assigns the subscription to a specified management group.
- Role-Based Access Control (RBAC) Assignments (Optional): Assigns predefined roles to users or groups.
- Diagnostic Settings: Configures monitoring and logging settings.
- Identity & Access Management: Automates Entra ID group creation for role assignments.
- PIM: Enable Privileged Identity Management for role assignments.
Default Behavior
By default, the module registers common resource providers, assigns the subscription to a management group, and enables Defender for Cloud with standard settings. Users can optionally enable budget alerts, role assignments, and diagnostic settings.
Customization
The module supports extensive customization through parameters, including:
- Resource Provider Selection: Register only necessary providers.
- Security Settings: Define Defender for Cloud pricing tiers and monitoring exclusions.
- Cost Management: Specify budget thresholds and alert recipients.
- Management Structure: Assign subscriptions to specific management groups.
This module ensures a consistent and repeatable approach to subscription configuration, reducing manual setup effort and enforcing governance policies.
Defender for Cloud
API Security Configuration
The API security settings in Defender for Cloud are managed through two interrelated parameters:
Behavior:
When
defenderApiTierisFree, thedefenderApiSubPlansetting is ignored and set tonullin Azure// Basic Free Tier (Sub Plan will be ignored) defenderApiTier: 'Free'When
defenderApiTierisStandard, thedefenderApiSubPlansetting defaults toP1but can be set to any value from P1 to P5// Standard Tier with P2 plan defenderApiTier: 'Standard' defenderApiSubPlan: 'P2'
Quick Start
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
name: 'myLandingZone'
partnerCountry: 'norway'
tags: {
Environment: 'Production'
}
}
}Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
budget | budgetType (object) | No | {} | Optional. A budget & alert configuration for the subscription. Default = null. |
defenderAgentlessVmScanningExclusionTags | string | No | "[[{}]" | Conditional. Required if enableAgentlessVmScanning = True. Provide a JSON array of Key Value Pairs defining exceptions for Agentless VM Scanning. |
defenderApiSubPlan | string | No | "P1" | Optional. The sub plan value for API. This can be empty, P1, P2, P3, P4, or P5. |
defenderApiTier | string | No | "Standard" | Optional. The pricing tier value for API. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderAppServicesPricingTier | string | No | "Standard" | Optional. The pricing tier value for AppServices. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderArmPricingTier | string | No | "Standard" | Optional. The pricing tier value for ARM. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCapGBPerMonthPerStorageAccount | string | No | "5000" | Optional. The monthly cap for malware scanning per storage account - -1 for infinite or at least 10. |
defenderContainersTier | string | No | "Standard" | Optional. The pricing tier value for containers. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCosmosDbsTier | string | No | "Standard" | Optional. The pricing tier value for CosmosDbs. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCspmPricingTier | string | No | "Free" | Optional. The pricing tier value for Defender CSPM. - Free or Standard. |
defenderDeviceSecurityGroupProperties | object | No | {} | Optional. Device Security group data. |
defenderEnableAgentlessDiscoveryForKubernetes | string | No | "True" | Optional. Enable zero footprint, API-based discovery of Kubernetes clusters - True or False. |
defenderEnableAgentlessVmScanning | string | No | "False" | Optional. Enable Agentless VM Scanning for VMs. This can be True or False. |
defenderEnableContainerRegistriesVulnerabilityAssessments | string | No | "True" | Optional. Enable vulnerability management for images stored in your container registries - True or False. |
defenderEnableContainerSensor | string | No | "True" | Optional. Enable rich threat detection suite for Kubernetes clusters, nodes, and workloads - True or False. |
defenderEnableEntraPermissionsManagement | string | No | "False" | Optional. Enable CIEM capabilities that helps organizations to manage and control user access and entitlements. This can be True or False. |
defenderEnableFileIntegrityMonitoring | string | No | "False" | Optional. Enable File Integrity Monitoring for VMs. This can be True or False. |
defenderEnableMdeDesignatedSubscription | string | No | "True" | Optional. Enable MdeDesignatedSubscription for VMs. This can be True or False. |
defenderEnableOnUploadMalwareScanning | string | No | "True" | Optional. Enable scanning of uploads to Storage Accounts - True or False. |
defenderEnableSensitiveDataDiscovery | string | No | "True" | Optional. Enable scanning for sensitive data uploaded to Storage Accounts - True or False. |
defenderFileIntegrityMonitoringRules | string | No | "[[{'RuleId':'<guid>','MonitoredEntities':{'WindowsFiles'... | Conditional. Required if enableFileIntegrityMonitoring = True. Provide a JSON array of Key Value Pairs defining rules for File Integrity Monitoring. |
defenderIoTSecuritySolutionProperties | object | No | {} | Optional. Security Solution data. |
defenderKeyVaultsPricingTier | string | No | "Standard" | Optional. The pricing tier value for KeyVaults. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderNotificationEmail | string | No | "" | Optional. Notification e-mail addresses: - comma separated string. |
defenderNotificationPhone | string | No | "" | Optional. Notification phone number. |
defenderNotificationSourcesMinimalRiskLevel | string | No | "Medium" | Optional. Enable notifications or not: - True or False. |
defenderNotificationsRoles | array | No | ["Owner", "Contributor"] | Optional. Which built-in roles should be notified in the event of an issue. Can include Owner, Controbutor, ServiceAdmin, or AccountAdmin. |
defenderNotificationsSourcesMinimalSeverity | string | No | "Medium" | Optional. The threshold for security alerts: - High, Medium, or Low. |
defenderOpenSourceRelationalDatabasesTier | string | No | "Standard" | Optional. The pricing tier value for OpenSourceRelationalDatabases. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderScope | string | No | "[subscription().id]" | Optional. All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope. |
defenderSqlServerVirtualMachinesPricingTier | string | No | "Standard" | Optional. The pricing tier value for SqlServerVirtualMachines. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderSqlServersPricingTier | string | No | "Standard" | Optional. The pricing tier value for SqlServers. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderStorageAccountsPricingTier | string | No | "Standard" | Optional. The pricing tier value for StorageAccounts. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderVirtualMachinesPricingTier | string | No | "Standard" | Optional. The pricing tier value for VMs. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderVirtualMachinesSubPlan | string | No | "P1" | Optional. The sub plan value for VMs. This can be empty, P1 or P2. |
defenderWorkspaceResourceId | string | No | "" | Optional. The full resource Id of the Log Analytics workspace to save the data in. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
location | string | No | "[deployment().location]" | Optional. Location for all Resources. |
name | string | No | "" | Optional. Name of the pattern to create. Default is lowercase subscription.displayName. |
partnerCountry | string | No | "norway" | Optional. The Partner ID for partner attribution. Default = Norway. |
resourceProvidersList | array | No | ["Microsoft.ApiManagement", "Microsoft.AppPlatform", "Mic... | Optional. An object of resource providers and resource providers features to register. If left blank/empty, no resource providers will be registered. |
tags | object | No | {} | Optional. Tags of the resource. |
Outputs
| Name | Type | Description |
|---|---|---|
provisioningRgLocation | string | The location where the provisioning resources were deployed. |
provisioningRgName | string | The Resource Group name that was created for provisioning resources. |
registeredResourceProviders | array | An array of resource providers that were registered in this deployment. |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|---|
0.1.12 | 2025-04-16 |
0.1.11 | 2025-04-01 |
0.1.10 | 2025-03-31 |
0.1.9 | 2025-03-16 |
0.1.8 | 2025-03-01 |
0.1.7 | 2025-02-25 |
0.1.6 | 2025-02-16 |
0.1.5 | 2025-02-12 |