Group
Manages a Management Group.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetSubscription.InvokeAsync());
var exampleParent = new Azure.Management.Group("exampleParent", new Azure.Management.GroupArgs
{
DisplayName = "ParentGroup",
SubscriptionIds =
{
current.Apply(current => current.SubscriptionId),
},
});
var exampleChild = new Azure.Management.Group("exampleChild", new Azure.Management.GroupArgs
{
DisplayName = "ChildGroup",
ParentManagementGroupId = exampleParent.Id,
SubscriptionIds =
{
current.Apply(current => current.SubscriptionId),
},
});
// other subscription IDs can go here
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetSubscription(ctx, nil, nil)
if err != nil {
return err
}
exampleParent, err := management.NewGroup(ctx, "exampleParent", &management.GroupArgs{
DisplayName: pulumi.String("ParentGroup"),
SubscriptionIds: pulumi.StringArray{
pulumi.String(current.SubscriptionId),
},
})
if err != nil {
return err
}
_, err = management.NewGroup(ctx, "exampleChild", &management.GroupArgs{
DisplayName: pulumi.String("ChildGroup"),
ParentManagementGroupId: exampleParent.ID(),
SubscriptionIds: pulumi.StringArray{
pulumi.String(current.SubscriptionId),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
current = azure.core.get_subscription()
example_parent = azure.management.Group("exampleParent",
display_name="ParentGroup",
subscription_ids=[current.subscription_id])
example_child = azure.management.Group("exampleChild",
display_name="ChildGroup",
parent_management_group_id=example_parent.id,
subscription_ids=[current.subscription_id])
# other subscription IDs can go hereimport * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getSubscription({});
const exampleParent = new azure.management.Group("exampleParent", {
displayName: "ParentGroup",
subscriptionIds: [current.then(current => current.subscriptionId)],
});
const exampleChild = new azure.management.Group("exampleChild", {
displayName: "ChildGroup",
parentManagementGroupId: exampleParent.id,
subscriptionIds: [current.then(current => current.subscriptionId)],
});
// other subscription IDs can go hereCreate a Group Resource
new Group(name: string, args?: GroupArgs, opts?: CustomResourceOptions);def Group(resource_name, opts=None, display_name=None, group_id=None, name=None, parent_management_group_id=None, subscription_ids=None, __props__=None);public Group(string name, GroupArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Group Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Group resource accepts the following input properties:
- Display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- Group
Id string 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.
- Name string
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.
- Parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- Subscription
Ids List<string> A list of Subscription GUIDs which should be assigned to the Management Group.
- Display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- Group
Id string 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.
- Name string
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.
- Parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- Subscription
Ids []string A list of Subscription GUIDs which should be assigned to the Management Group.
- display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- group
Id string 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.
- name string
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.
- parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- subscription
Ids string[] A list of Subscription GUIDs which should be assigned to the Management Group.
- display_
name str A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- group_
id str 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.
- name str
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.
- parent_
management_ strgroup_ id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- subscription_
ids List[str] A list of Subscription GUIDs which should be assigned to the Management Group.
Outputs
All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:
Look up an Existing Group Resource
Get an existing Group resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GroupState, opts?: CustomResourceOptions): Groupstatic get(resource_name, id, opts=None, display_name=None, group_id=None, name=None, parent_management_group_id=None, subscription_ids=None, __props__=None);func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- Group
Id string 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.
- Name string
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.
- Parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- Subscription
Ids List<string> A list of Subscription GUIDs which should be assigned to the Management Group.
- Display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- Group
Id string 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.
- Name string
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.
- Parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- Subscription
Ids []string A list of Subscription GUIDs which should be assigned to the Management Group.
- display
Name string A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- group
Id string 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.
- name string
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.
- parent
Management stringGroup Id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- subscription
Ids string[] A list of Subscription GUIDs which should be assigned to the Management Group.
- display_
name str A friendly name for this Management Group. If not specified, this’ll be the same as the
name.- group_
id str 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.
- name str
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.
- parent_
management_ strgroup_ id The ID of the Parent Management Group. Changing this forces a new resource to be created.
- subscription_
ids List[str] A list of Subscription GUIDs which should be assigned to the Management Group.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.