import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Blueprint Assignment resource * * > **NOTE:** Azure Blueprints are in Preview and potentially subject to breaking change without notice. * * > **NOTE:** Azure Blueprint Assignments can only be applied to Subscriptions. Assignments to Management Groups is not currently supported by the service or by this provider. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const current = azure.core.getClientConfig({}); * const example = azure.core.getSubscription({}); * const exampleGetDefinition = example.then(example => azure.blueprint.getDefinition({ * name: "exampleBlueprint", * scopeId: example.id, * })); * const exampleGetPublishedVersion = Promise.all([exampleGetDefinition, exampleGetDefinition]).then(([exampleGetDefinition, exampleGetDefinition1]) => azure.blueprint.getPublishedVersion({ * scopeId: exampleGetDefinition.scopeId, * blueprintName: exampleGetDefinition1.name, * version: "v1.0.0", * })); * const exampleResourceGroup = new azure.core.ResourceGroup("example", { * name: "exampleRG-bp", * location: "West Europe", * tags: { * Environment: "example", * }, * }); * const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", { * resourceGroupName: exampleResourceGroup.name, * location: exampleResourceGroup.location, * name: "bp-user-example", * }); * const operator = new azure.authorization.Assignment("operator", { * scope: example.then(example => example.id), * roleDefinitionName: "Blueprint Operator", * principalId: exampleUserAssignedIdentity.principalId, * }); * const owner = new azure.authorization.Assignment("owner", { * scope: example.then(example => example.id), * roleDefinitionName: "Owner", * principalId: exampleUserAssignedIdentity.principalId, * }); * const exampleAssignment = new azure.blueprint.Assignment("example", { * name: "testAccBPAssignment", * targetSubscriptionId: example.then(example => example.id), * versionId: exampleGetPublishedVersion.then(exampleGetPublishedVersion => exampleGetPublishedVersion.id), * location: exampleResourceGroup.location, * lockMode: "AllResourcesDoNotDelete", * lockExcludePrincipals: [current.then(current => current.objectId)], * identity: { * type: "UserAssigned", * identityIds: [exampleUserAssignedIdentity.id], * }, * resourceGroups: ` { * \\"ResourceGroup\\": { * \\"name\\": \\"exampleRG-bp\\" * } * } * `, * parameterValues: ` { * \\"allowedlocationsforresourcegroups_listOfAllowedLocations\\": { * \\"value\\": [\\"westus\\", \\"westus2\\", \\"eastus\\", \\"centralus\\", \\"centraluseuap\\", \\"southcentralus\\", \\"northcentralus\\", \\"westcentralus\\", \\"eastus2\\", \\"eastus2euap\\", \\"brazilsouth\\", \\"brazilus\\", \\"northeurope\\", \\"westeurope\\", \\"eastasia\\", \\"southeastasia\\", \\"japanwest\\", \\"japaneast\\", \\"koreacentral\\", \\"koreasouth\\", \\"indiasouth\\", \\"indiawest\\", \\"indiacentral\\", \\"australiaeast\\", \\"australiasoutheast\\", \\"canadacentral\\", \\"canadaeast\\", \\"uknorth\\", \\"uksouth2\\", \\"uksouth\\", \\"ukwest\\", \\"francecentral\\", \\"francesouth\\", \\"australiacentral\\", \\"australiacentral2\\", \\"uaecentral\\", \\"uaenorth\\", \\"southafricanorth\\", \\"southafricawest\\", \\"switzerlandnorth\\", \\"switzerlandwest\\", \\"germanynorth\\", \\"germanywestcentral\\", \\"norwayeast\\", \\"norwaywest\\"] * } * } * `, * }, { * dependsOn: [ * operator, * owner, * ], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Blueprint` - 2018-11-01-preview * * ## Import * * Azure Blueprint Assignments can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:blueprint/assignment:Assignment example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint" * ``` */ export declare class Assignment extends pulumi.CustomResource { /** * Get an existing Assignment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AssignmentState, opts?: pulumi.CustomResourceOptions): Assignment; /** * Returns true if the given object is an instance of Assignment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Assignment; /** * The name of the blueprint assigned */ readonly blueprintName: pulumi.Output; /** * The Description on the Blueprint */ readonly description: pulumi.Output; /** * The display name of the blueprint */ readonly displayName: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * The Azure location of the Assignment. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint. */ readonly lockExcludeActions: pulumi.Output; /** * a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint. */ readonly lockExcludePrincipals: pulumi.Output; /** * The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`. */ readonly lockMode: pulumi.Output; /** * The name of the Blueprint Assignment. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * a JSON string to supply Blueprint Assignment parameter values. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ readonly parameterValues: pulumi.Output; /** * a JSON string to supply the Blueprint Resource Group information. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ readonly resourceGroups: pulumi.Output; /** * The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created. */ readonly targetSubscriptionId: pulumi.Output; readonly type: pulumi.Output; /** * The ID of the Published Version of the blueprint to be assigned. */ readonly versionId: pulumi.Output; /** * Create a Assignment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AssignmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Assignment resources. */ export interface AssignmentState { /** * The name of the blueprint assigned */ blueprintName?: pulumi.Input; /** * The Description on the Blueprint */ description?: pulumi.Input; /** * The display name of the blueprint */ displayName?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure location of the Assignment. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint. */ lockExcludeActions?: pulumi.Input[]>; /** * a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint. */ lockExcludePrincipals?: pulumi.Input[]>; /** * The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`. */ lockMode?: pulumi.Input; /** * The name of the Blueprint Assignment. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * a JSON string to supply Blueprint Assignment parameter values. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ parameterValues?: pulumi.Input; /** * a JSON string to supply the Blueprint Resource Group information. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ resourceGroups?: pulumi.Input; /** * The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created. */ targetSubscriptionId?: pulumi.Input; type?: pulumi.Input; /** * The ID of the Published Version of the blueprint to be assigned. */ versionId?: pulumi.Input; } /** * The set of arguments for constructing a Assignment resource. */ export interface AssignmentArgs { /** * An `identity` block as defined below. */ identity: pulumi.Input; /** * The Azure location of the Assignment. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint. */ lockExcludeActions?: pulumi.Input[]>; /** * a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint. */ lockExcludePrincipals?: pulumi.Input[]>; /** * The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`. */ lockMode?: pulumi.Input; /** * The name of the Blueprint Assignment. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * a JSON string to supply Blueprint Assignment parameter values. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ parameterValues?: pulumi.Input; /** * a JSON string to supply the Blueprint Resource Group information. * * > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail. */ resourceGroups?: pulumi.Input; /** * The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created. */ targetSubscriptionId: pulumi.Input; /** * The ID of the Published Version of the blueprint to be assigned. */ versionId: pulumi.Input; }