GroupSubscriptionAssociation

class GroupSubscriptionAssociation : KotlinCustomResource

Manages a Management Group Subscription Association. !>Note: When using this resource, configuring subscription_ids on the azure.management.Group resource is not supported.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.management.ManagementFunctions;
import com.pulumi.azure.management.inputs.GetGroupArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
import com.pulumi.azure.management.GroupSubscriptionAssociation;
import com.pulumi.azure.management.GroupSubscriptionAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleGroup = ManagementFunctions.getGroup(GetGroupArgs.builder()
.name("exampleManagementGroup")
.build());
final var exampleSubscription = CoreFunctions.getSubscription(GetSubscriptionArgs.builder()
.subscriptionId("12345678-1234-1234-1234-123456789012")
.build());
var exampleGroupSubscriptionAssociation = new GroupSubscriptionAssociation("exampleGroupSubscriptionAssociation", GroupSubscriptionAssociationArgs.builder()
.managementGroupId(exampleGroup.applyValue(getGroupResult -> getGroupResult.id()))
.subscriptionId(exampleSubscription.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
.build());
}
}

Import

Managements can be imported using the resource id, e.g.

$ pulumi import azure:management/groupSubscriptionAssociation:GroupSubscriptionAssociation example /managementGroup/MyManagementGroup/subscription/12345678-1234-1234-1234-123456789012

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val subscriptionId: Output<String>

The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.

Link copied to clipboard
val urn: Output<String>