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.

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 TypeAPI Version
Microsoft.Management/managementGroups/subscriptions2021-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

ParameterTypeDescription
subscriptionPlacementsarrayThe management group IDs along with the subscriptions to be placed underneath them.

Optional parameters

ParameterTypeDescription
enableTelemetryboolEnable/Disable usage telemetry for module.
locationstringLocation for all Resources.
Parameter: subscriptionPlacements

The management group IDs along with the subscriptions to be placed underneath them.

  • Required: Yes
  • Type: array

Required parameters

ParameterTypeDescription
managementGroupIdstringThe unique identifier of the target management group where subscriptions are to be placed.
subscriptionIdsarrayA 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

OutputTypeDescription
subscriptionPlacementSummarystringOutput 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).

ReferenceType
br/innofactor:avm/ptn/lz/subscription-placementRemote 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.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206).
  • Released by the hardened pipeline: published only when main.json changes, 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

VersionPublished
0.1.92026-11-16
0.1.82025-05-16
0.1.72025-05-01
0.1.62025-04-16
0.1.52025-04-01
0.1.42025-03-31
0.1.32025-03-16
0.1.22025-03-01
0.1.12025-02-16
0.1.02025-02-12