azurermManagementGroup
Manages a Management Group.
!> Note: Configuring subscriptionIds
is not supported when using the azurermManagementGroupSubscriptionAssociation
resource, results will be unpredictable.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermSubscriptionCurrent =
new azurerm.dataAzurermSubscription.DataAzurermSubscription(
this,
"current",
{}
);
const azurermManagementGroupExampleParent =
new azurerm.managementGroup.ManagementGroup(this, "example_parent", {
display_name: "ParentGroup",
subscription_ids: [dataAzurermSubscriptionCurrent.subscriptionId],
});
new azurerm.managementGroup.ManagementGroup(this, "example_child", {
display_name: "ChildGroup",
parent_management_group_id: azurermManagementGroupExampleParent.id,
subscription_ids: [dataAzurermSubscriptionCurrent.subscriptionId],
});
Argument Reference
The following arguments are supported:
-
name
- (Optional) The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created. -
displayName
- (Optional) A friendly name for this Management Group. If not specified, this will be the same as thename
. -
parentManagementGroupId
- (Optional) The ID of the Parent Management Group. -
subscriptionIds
- (Optional) A list of Subscription GUIDs which should be assigned to the Management Group.
\~> Note: To clear all Subscriptions from the Management Group set subscriptionIds
to an empty list
Attributes Reference
The following attributes are exported:
id
- The ID of the Management Group.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Management Group.update
- (Defaults to 30 minutes) Used when updating the Management Group.read
- (Defaults to 5 minutes) Used when retrieving the Management Group.delete
- (Defaults to 30 minutes) Used when deleting the Management Group.
Import
Management Groups can be imported using the managementGroupResourceId
, e.g.