Namespace Pulumi.Azure.Management
Classes
GetGroup
GetGroupArgs
GetGroupResult
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
}
}
GroupArgs
GroupState
Lock
Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource.
Example Usage (Subscription Level Lock)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetSubscription.InvokeAsync());
var subscription_level = new Azure.Management.Lock("subscription-level", new Azure.Management.LockArgs
{
Scope = current.Apply(current => current.Id),
LockLevel = "CanNotDelete",
Notes = "Items can't be deleted in this subscription!",
});
}
}
## Example Usage (Resource Group Level Lock)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = new Azure.Core.ResourceGroup("example", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var resource_group_level = new Azure.Management.Lock("resource-group-level", new Azure.Management.LockArgs
{
Scope = example.Id,
LockLevel = "ReadOnly",
Notes = "This Resource Group is Read-Only",
});
}
}
Example Usage (Resource Level Lock)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new Azure.Network.PublicIpArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
AllocationMethod = "Static",
IdleTimeoutInMinutes = 30,
});
var public_ip = new Azure.Management.Lock("public-ip", new Azure.Management.LockArgs
{
Scope = examplePublicIp.Id,
LockLevel = "CanNotDelete",
Notes = "Locked because it's needed by a third-party",
});
}
}