Azure Subscription Placement
br/innofactor:avm/ptn/management/subscription-placement:0.1.9
README
subscription-placement [Management/SubscriptionPlacement]
Subscription Placement Module
This module automates the placement of Azure subscriptions into management groups, ensuring a structured and governed hierarchy within an enterprise environment. By using this module, organizations can enforce compliance, security policies, and streamlined management of subscriptions at scale.
Navigation
- Features Implemented
- Default Behavior
- Customization
- Quick Start
- Resource Types
- Usage examples
- Parameters
- Outputs
- Cross-referenced modules
- Data Collection
Features Implemented
- Subscription Assignment: Places one or more subscriptions into designated management groups.
- Multi-Management Group Support: Supports assigning subscriptions across multiple management groups in a single deployment.
Default Behavior
By default, the module:
- Assigns subscriptions to specified management groups as per the provided input.
- Uses the deployment location for tracking and logging.
- Enables telemetry for usage monitoring unless explicitly disabled.
Customization
The module allows extensive customization via parameters:
- Management Group ID: Define the target management groups where subscriptions will be placed.
- Subscription IDs: Provide a list of subscriptions to assign to each management group.
- Location: Set the deployment location (default is the current deployment region).
- Telemetry Enablement: Opt in or out of module usage telemetry.
This module simplifies the process of structuring subscriptions under a management group hierarchy, improving governance, security, and operational consistency.
Quick Start
To use the module in your deployment, include the following snippet in your Bicep file:
module subscriptionPlacement 'br/innofactor:avm/ptn/lz/subscription-placement' = {
name: 'subscriptionPlacement'
scope: tenant()
params: {
subscriptionPlacements: [
{
managementGroupId: 'myManagementGroup'
subscriptionIds: ['00000000-0000-0000-0000-000000000000']
}
]
enableTelemetry: true
}
}Resource Types
| Resource Type | API Version |
|---|---|
Microsoft.Management/managementGroups/subscriptions | 2021-04-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax
br/innofactor:avm/ptn/management/subscription-placement:<version>.
Example 1: Using only defaults.
This instance deploys the module with the minimum set of required parameters.
via Bicep module
module subscriptionPlacement 'br/innofactor:avm/ptn/management/subscription-placement:<version>' = {
name: 'subscriptionPlacementDeployment'
params: {
subscriptionPlacements: [
{
managementGroupId: '<managementGroupId>'
subscriptionIds: [
'<subscriptionId>'
]
}
]
}
}via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionPlacements": {
"value": [
{
"managementGroupId": "<managementGroupId>",
"subscriptionIds": [
"<subscriptionId>"
]
}
]
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/management/subscription-placement:<version>'
param subscriptionPlacements = [
{
managementGroupId: '<managementGroupId>'
subscriptionIds: [
'<subscriptionId>'
]
}
]
Parameters
Required parameters
| Parameter | Type | Description |
|---|---|---|
subscriptionPlacements | array | The management group IDs along with the subscriptions to be placed underneath them. |
Optional parameters
| Parameter | Type | Description |
|---|---|---|
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
location | string | Location for all Resources. |
Parameter: subscriptionPlacements
The management group IDs along with the subscriptions to be placed underneath them.
- Required: Yes
- Type: array
Required parameters
| Parameter | Type | Description |
|---|---|---|
managementGroupId | string | The unique identifier of the target management group where subscriptions are to be placed. |
subscriptionIds | array | A list of subscription IDs that are to be assigned to the specified management group. |
Parameter: subscriptionPlacements.managementGroupId
The unique identifier of the target management group where subscriptions are to be placed.
- Required: Yes
- Type: string
Parameter: subscriptionPlacements.subscriptionIds
A list of subscription IDs that are to be assigned to the specified management group.
- Required: Yes
- Type: array
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[deployment().location]
Outputs
| Output | Type | Description |
|---|---|---|
subscriptionPlacementSummary | string | Output of number of management groups that have been configured with subscription placements. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|---|
br/innofactor:avm/ptn/lz/subscription-placement | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.9
Changes
- Regenerated
main.jsonandREADME.mdwith Bicep 0.49.2 so that they matchmain.bicep(#206). - Released by the hardened pipeline: published only when
main.jsonchanges, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
- None
0.1.8
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.5
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
- None
0.1.0
Changes
- Updates to Subscription Placement (#118)
Breaking Changes
- None
Version history
| Version | Published |
|---|---|
0.1.9 | 2026-11-16 |
0.1.8 | 2025-05-16 |
0.1.7 | 2025-05-01 |
0.1.6 | 2025-04-16 |
0.1.5 | 2025-04-01 |
0.1.4 | 2025-03-31 |
0.1.3 | 2025-03-16 |
0.1.2 | 2025-03-01 |
0.1.1 | 2025-02-16 |
0.1.0 | 2025-02-12 |