1. Packages
  2. Azure Classic
  3. API Docs
  4. blueprint
  5. Assignment

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    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

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
            var exampleSubscription = Output.Create(Azure.Core.GetSubscription.InvokeAsync());
            var exampleDefinition = exampleSubscription.Apply(exampleSubscription => Output.Create(Azure.Blueprint.GetDefinition.InvokeAsync(new Azure.Blueprint.GetDefinitionArgs
            {
                Name = "exampleBlueprint",
                ScopeId = exampleSubscription.Id,
            })));
            var examplePublishedVersion = Output.Tuple(exampleDefinition, exampleDefinition).Apply(values =>
            {
                var exampleDefinition = values.Item1;
                var exampleDefinition1 = values.Item2;
                return Output.Create(Azure.Blueprint.GetPublishedVersion.InvokeAsync(new Azure.Blueprint.GetPublishedVersionArgs
                {
                    ScopeId = exampleDefinition.ScopeId,
                    BlueprintName = exampleDefinition1.Name,
                    Version = "v1.0.0",
                }));
            });
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
                Tags = 
                {
                    { "Environment", "example" },
                },
            });
            var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("exampleUserAssignedIdentity", new Azure.Authorization.UserAssignedIdentityArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
            });
            var @operator = new Azure.Authorization.Assignment("operator", new Azure.Authorization.AssignmentArgs
            {
                Scope = exampleSubscription.Apply(exampleSubscription => exampleSubscription.Id),
                RoleDefinitionName = "Blueprint Operator",
                PrincipalId = exampleUserAssignedIdentity.PrincipalId,
            });
            var owner = new Azure.Authorization.Assignment("owner", new Azure.Authorization.AssignmentArgs
            {
                Scope = exampleSubscription.Apply(exampleSubscription => exampleSubscription.Id),
                RoleDefinitionName = "Owner",
                PrincipalId = exampleUserAssignedIdentity.PrincipalId,
            });
            var exampleAssignment = new Azure.Blueprint.Assignment("exampleAssignment", new Azure.Blueprint.AssignmentArgs
            {
                TargetSubscriptionId = exampleSubscription.Apply(exampleSubscription => exampleSubscription.Id),
                VersionId = examplePublishedVersion.Apply(examplePublishedVersion => examplePublishedVersion.Id),
                Location = exampleResourceGroup.Location,
                LockMode = "AllResourcesDoNotDelete",
                LockExcludePrincipals = 
                {
                    current.Apply(current => current.ObjectId),
                },
                Identity = new Azure.Blueprint.Inputs.AssignmentIdentityArgs
                {
                    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""]
          }
        }
    ",
            }, new CustomResourceOptions
            {
                DependsOn = 
                {
                    @operator,
                    owner,
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/authorization"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/blueprint"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleSubscription, err := core.LookupSubscription(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleDefinition, err := blueprint.GetDefinition(ctx, &blueprint.GetDefinitionArgs{
    			Name:    "exampleBlueprint",
    			ScopeId: exampleSubscription.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		examplePublishedVersion, err := blueprint.GetPublishedVersion(ctx, &blueprint.GetPublishedVersionArgs{
    			ScopeId:       exampleDefinition.ScopeId,
    			BlueprintName: exampleDefinition.Name,
    			Version:       "v1.0.0",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    			Tags: pulumi.StringMap{
    				"Environment": pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "exampleUserAssignedIdentity", &authorization.UserAssignedIdentityArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    		})
    		if err != nil {
    			return err
    		}
    		operator, err := authorization.NewAssignment(ctx, "operator", &authorization.AssignmentArgs{
    			Scope:              pulumi.String(exampleSubscription.Id),
    			RoleDefinitionName: pulumi.String("Blueprint Operator"),
    			PrincipalId:        exampleUserAssignedIdentity.PrincipalId,
    		})
    		if err != nil {
    			return err
    		}
    		owner, err := authorization.NewAssignment(ctx, "owner", &authorization.AssignmentArgs{
    			Scope:              pulumi.String(exampleSubscription.Id),
    			RoleDefinitionName: pulumi.String("Owner"),
    			PrincipalId:        exampleUserAssignedIdentity.PrincipalId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = blueprint.NewAssignment(ctx, "exampleAssignment", &blueprint.AssignmentArgs{
    			TargetSubscriptionId: pulumi.String(exampleSubscription.Id),
    			VersionId:            pulumi.String(examplePublishedVersion.Id),
    			Location:             exampleResourceGroup.Location,
    			LockMode:             pulumi.String("AllResourcesDoNotDelete"),
    			LockExcludePrincipals: pulumi.StringArray{
    				pulumi.String(current.ObjectId),
    			},
    			Identity: &blueprint.AssignmentIdentityArgs{
    				Type: pulumi.String("UserAssigned"),
    				IdentityIds: pulumi.StringArray{
    					exampleUserAssignedIdentity.ID(),
    				},
    			},
    			ResourceGroups:  pulumi.String(fmt.Sprintf("%v%v%v%v%v", "    {\n", "      \"ResourceGroup\": {\n", "        \"name\": \"exampleRG-bp\"\n", "      }\n", "    }\n")),
    			ParameterValues: pulumi.String(fmt.Sprintf("%v%v%v%v%v", "    {\n", "      \"allowedlocationsforresourcegroups_listOfAllowedLocations\": {\n", "        \"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\"]\n", "      }\n", "    }\n")),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			operator,
    			owner,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const current = azure.core.getClientConfig({});
    const exampleSubscription = azure.core.getSubscription({});
    const exampleDefinition = exampleSubscription.then(exampleSubscription => azure.blueprint.getDefinition({
        name: "exampleBlueprint",
        scopeId: exampleSubscription.id,
    }));
    const examplePublishedVersion = Promise.all([exampleDefinition, exampleDefinition]).then(([exampleDefinition, exampleDefinition1]) => azure.blueprint.getPublishedVersion({
        scopeId: exampleDefinition.scopeId,
        blueprintName: exampleDefinition1.name,
        version: "v1.0.0",
    }));
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {
        location: "West Europe",
        tags: {
            Environment: "example",
        },
    });
    const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("exampleUserAssignedIdentity", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
    });
    const operator = new azure.authorization.Assignment("operator", {
        scope: exampleSubscription.then(exampleSubscription => exampleSubscription.id),
        roleDefinitionName: "Blueprint Operator",
        principalId: exampleUserAssignedIdentity.principalId,
    });
    const owner = new azure.authorization.Assignment("owner", {
        scope: exampleSubscription.then(exampleSubscription => exampleSubscription.id),
        roleDefinitionName: "Owner",
        principalId: exampleUserAssignedIdentity.principalId,
    });
    const exampleAssignment = new azure.blueprint.Assignment("exampleAssignment", {
        targetSubscriptionId: exampleSubscription.then(exampleSubscription => exampleSubscription.id),
        versionId: examplePublishedVersion.then(examplePublishedVersion => examplePublishedVersion.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,
        ],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    example_subscription = azure.core.get_subscription()
    example_definition = azure.blueprint.get_definition(name="exampleBlueprint",
        scope_id=example_subscription.id)
    example_published_version = azure.blueprint.get_published_version(scope_id=example_definition.scope_id,
        blueprint_name=example_definition.name,
        version="v1.0.0")
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup",
        location="West Europe",
        tags={
            "Environment": "example",
        })
    example_user_assigned_identity = azure.authorization.UserAssignedIdentity("exampleUserAssignedIdentity",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location)
    operator = azure.authorization.Assignment("operator",
        scope=example_subscription.id,
        role_definition_name="Blueprint Operator",
        principal_id=example_user_assigned_identity.principal_id)
    owner = azure.authorization.Assignment("owner",
        scope=example_subscription.id,
        role_definition_name="Owner",
        principal_id=example_user_assigned_identity.principal_id)
    example_assignment = azure.blueprint.Assignment("exampleAssignment",
        target_subscription_id=example_subscription.id,
        version_id=example_published_version.id,
        location=example_resource_group.location,
        lock_mode="AllResourcesDoNotDelete",
        lock_exclude_principals=[current.object_id],
        identity=azure.blueprint.AssignmentIdentityArgs(
            type="UserAssigned",
            identity_ids=[example_user_assigned_identity.id],
        ),
        resource_groups="""    {
          "ResourceGroup": {
            "name": "exampleRG-bp"
          }
        }
    """,
        parameter_values="""    {
          "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"]
          }
        }
    """,
        opts=pulumi.ResourceOptions(depends_on=[
                operator,
                owner,
            ]))
    

    Example coming soon!

    Create Assignment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Assignment(name: string, args: AssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def Assignment(resource_name: str,
                   args: AssignmentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Assignment(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   identity: Optional[AssignmentIdentityArgs] = None,
                   target_subscription_id: Optional[str] = None,
                   version_id: Optional[str] = None,
                   location: Optional[str] = None,
                   lock_exclude_actions: Optional[Sequence[str]] = None,
                   lock_exclude_principals: Optional[Sequence[str]] = None,
                   lock_mode: Optional[str] = None,
                   name: Optional[str] = None,
                   parameter_values: Optional[str] = None,
                   resource_groups: Optional[str] = None)
    func NewAssignment(ctx *Context, name string, args AssignmentArgs, opts ...ResourceOption) (*Assignment, error)
    public Assignment(string name, AssignmentArgs args, CustomResourceOptions? opts = null)
    public Assignment(String name, AssignmentArgs args)
    public Assignment(String name, AssignmentArgs args, CustomResourceOptions options)
    
    type: azure:blueprint:Assignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AssignmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var azureAssignmentResource = new Azure.Blueprint.Assignment("azureAssignmentResource", new()
    {
        Identity = new Azure.Blueprint.Inputs.AssignmentIdentityArgs
        {
            IdentityIds = new[]
            {
                "string",
            },
            Type = "string",
        },
        TargetSubscriptionId = "string",
        VersionId = "string",
        Location = "string",
        LockExcludeActions = new[]
        {
            "string",
        },
        LockExcludePrincipals = new[]
        {
            "string",
        },
        LockMode = "string",
        Name = "string",
        ParameterValues = "string",
        ResourceGroups = "string",
    });
    
    example, err := blueprint.NewAssignment(ctx, "azureAssignmentResource", &blueprint.AssignmentArgs{
    	Identity: &blueprint.AssignmentIdentityArgs{
    		IdentityIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Type: pulumi.String("string"),
    	},
    	TargetSubscriptionId: pulumi.String("string"),
    	VersionId:            pulumi.String("string"),
    	Location:             pulumi.String("string"),
    	LockExcludeActions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LockExcludePrincipals: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LockMode:        pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	ParameterValues: pulumi.String("string"),
    	ResourceGroups:  pulumi.String("string"),
    })
    
    var azureAssignmentResource = new com.pulumi.azure.blueprint.Assignment("azureAssignmentResource", com.pulumi.azure.blueprint.AssignmentArgs.builder()
        .identity(AssignmentIdentityArgs.builder()
            .identityIds("string")
            .type("string")
            .build())
        .targetSubscriptionId("string")
        .versionId("string")
        .location("string")
        .lockExcludeActions("string")
        .lockExcludePrincipals("string")
        .lockMode("string")
        .name("string")
        .parameterValues("string")
        .resourceGroups("string")
        .build());
    
    azure_assignment_resource = azure.blueprint.Assignment("azureAssignmentResource",
        identity={
            "identity_ids": ["string"],
            "type": "string",
        },
        target_subscription_id="string",
        version_id="string",
        location="string",
        lock_exclude_actions=["string"],
        lock_exclude_principals=["string"],
        lock_mode="string",
        name="string",
        parameter_values="string",
        resource_groups="string")
    
    const azureAssignmentResource = new azure.blueprint.Assignment("azureAssignmentResource", {
        identity: {
            identityIds: ["string"],
            type: "string",
        },
        targetSubscriptionId: "string",
        versionId: "string",
        location: "string",
        lockExcludeActions: ["string"],
        lockExcludePrincipals: ["string"],
        lockMode: "string",
        name: "string",
        parameterValues: "string",
        resourceGroups: "string",
    });
    
    type: azure:blueprint:Assignment
    properties:
        identity:
            identityIds:
                - string
            type: string
        location: string
        lockExcludeActions:
            - string
        lockExcludePrincipals:
            - string
        lockMode: string
        name: string
        parameterValues: string
        resourceGroups: string
        targetSubscriptionId: string
        versionId: string
    

    Assignment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Assignment resource accepts the following input properties:

    Identity AssignmentIdentity
    An identity block as defined below.
    TargetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    VersionId string
    The ID of the Published Version of the blueprint to be assigned.
    Location string
    The Azure location of the Assignment.
    LockExcludeActions List<string>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    LockExcludePrincipals List<string>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    LockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    Name string
    The name of the Blueprint Assignment
    ParameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    ResourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    Identity AssignmentIdentityArgs
    An identity block as defined below.
    TargetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    VersionId string
    The ID of the Published Version of the blueprint to be assigned.
    Location string
    The Azure location of the Assignment.
    LockExcludeActions []string
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    LockExcludePrincipals []string
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    LockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    Name string
    The name of the Blueprint Assignment
    ParameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    ResourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    identity AssignmentIdentity
    An identity block as defined below.
    targetSubscriptionId String
    The Subscription ID the Blueprint Published Version is to be applied to.
    versionId String
    The ID of the Published Version of the blueprint to be assigned.
    location String
    The Azure location of the Assignment.
    lockExcludeActions List<String>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals List<String>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode String
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name String
    The name of the Blueprint Assignment
    parameterValues String
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups String
    a JSON string to supply the Blueprint Resource Group information.
    identity AssignmentIdentity
    An identity block as defined below.
    targetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    versionId string
    The ID of the Published Version of the blueprint to be assigned.
    location string
    The Azure location of the Assignment.
    lockExcludeActions string[]
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals string[]
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name string
    The name of the Blueprint Assignment
    parameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    identity AssignmentIdentityArgs
    An identity block as defined below.
    target_subscription_id str
    The Subscription ID the Blueprint Published Version is to be applied to.
    version_id str
    The ID of the Published Version of the blueprint to be assigned.
    location str
    The Azure location of the Assignment.
    lock_exclude_actions Sequence[str]
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lock_exclude_principals Sequence[str]
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lock_mode str
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name str
    The name of the Blueprint Assignment
    parameter_values str
    a JSON string to supply Blueprint Assignment parameter values.
    resource_groups str
    a JSON string to supply the Blueprint Resource Group information.
    identity Property Map
    An identity block as defined below.
    targetSubscriptionId String
    The Subscription ID the Blueprint Published Version is to be applied to.
    versionId String
    The ID of the Published Version of the blueprint to be assigned.
    location String
    The Azure location of the Assignment.
    lockExcludeActions List<String>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals List<String>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode String
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name String
    The name of the Blueprint Assignment
    parameterValues String
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups String
    a JSON string to supply the Blueprint Resource Group information.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Assignment resource produces the following output properties:

    BlueprintName string
    The name of the blueprint assigned
    Description string
    The Description on the Blueprint
    DisplayName string
    The display name of the blueprint
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    BlueprintName string
    The name of the blueprint assigned
    Description string
    The Description on the Blueprint
    DisplayName string
    The display name of the blueprint
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    blueprintName String
    The name of the blueprint assigned
    description String
    The Description on the Blueprint
    displayName String
    The display name of the blueprint
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    blueprintName string
    The name of the blueprint assigned
    description string
    The Description on the Blueprint
    displayName string
    The display name of the blueprint
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    blueprint_name str
    The name of the blueprint assigned
    description str
    The Description on the Blueprint
    display_name str
    The display name of the blueprint
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    blueprintName String
    The name of the blueprint assigned
    description String
    The Description on the Blueprint
    displayName String
    The display name of the blueprint
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.

    Look up Existing Assignment Resource

    Get an existing Assignment 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?: AssignmentState, opts?: CustomResourceOptions): Assignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blueprint_name: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            identity: Optional[AssignmentIdentityArgs] = None,
            location: Optional[str] = None,
            lock_exclude_actions: Optional[Sequence[str]] = None,
            lock_exclude_principals: Optional[Sequence[str]] = None,
            lock_mode: Optional[str] = None,
            name: Optional[str] = None,
            parameter_values: Optional[str] = None,
            resource_groups: Optional[str] = None,
            target_subscription_id: Optional[str] = None,
            type: Optional[str] = None,
            version_id: Optional[str] = None) -> Assignment
    func GetAssignment(ctx *Context, name string, id IDInput, state *AssignmentState, opts ...ResourceOption) (*Assignment, error)
    public static Assignment Get(string name, Input<string> id, AssignmentState? state, CustomResourceOptions? opts = null)
    public static Assignment get(String name, Output<String> id, AssignmentState state, CustomResourceOptions options)
    resources:  _:    type: azure:blueprint:Assignment    get:      id: ${id}
    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.
    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:
    BlueprintName string
    The name of the blueprint assigned
    Description string
    The Description on the Blueprint
    DisplayName string
    The display name of the blueprint
    Identity AssignmentIdentity
    An identity block as defined below.
    Location string
    The Azure location of the Assignment.
    LockExcludeActions List<string>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    LockExcludePrincipals List<string>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    LockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    Name string
    The name of the Blueprint Assignment
    ParameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    ResourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    TargetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    VersionId string
    The ID of the Published Version of the blueprint to be assigned.
    BlueprintName string
    The name of the blueprint assigned
    Description string
    The Description on the Blueprint
    DisplayName string
    The display name of the blueprint
    Identity AssignmentIdentityArgs
    An identity block as defined below.
    Location string
    The Azure location of the Assignment.
    LockExcludeActions []string
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    LockExcludePrincipals []string
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    LockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    Name string
    The name of the Blueprint Assignment
    ParameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    ResourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    TargetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    VersionId string
    The ID of the Published Version of the blueprint to be assigned.
    blueprintName String
    The name of the blueprint assigned
    description String
    The Description on the Blueprint
    displayName String
    The display name of the blueprint
    identity AssignmentIdentity
    An identity block as defined below.
    location String
    The Azure location of the Assignment.
    lockExcludeActions List<String>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals List<String>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode String
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name String
    The name of the Blueprint Assignment
    parameterValues String
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups String
    a JSON string to supply the Blueprint Resource Group information.
    targetSubscriptionId String
    The Subscription ID the Blueprint Published Version is to be applied to.
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    versionId String
    The ID of the Published Version of the blueprint to be assigned.
    blueprintName string
    The name of the blueprint assigned
    description string
    The Description on the Blueprint
    displayName string
    The display name of the blueprint
    identity AssignmentIdentity
    An identity block as defined below.
    location string
    The Azure location of the Assignment.
    lockExcludeActions string[]
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals string[]
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode string
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name string
    The name of the Blueprint Assignment
    parameterValues string
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups string
    a JSON string to supply the Blueprint Resource Group information.
    targetSubscriptionId string
    The Subscription ID the Blueprint Published Version is to be applied to.
    type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    versionId string
    The ID of the Published Version of the blueprint to be assigned.
    blueprint_name str
    The name of the blueprint assigned
    description str
    The Description on the Blueprint
    display_name str
    The display name of the blueprint
    identity AssignmentIdentityArgs
    An identity block as defined below.
    location str
    The Azure location of the Assignment.
    lock_exclude_actions Sequence[str]
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lock_exclude_principals Sequence[str]
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lock_mode str
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name str
    The name of the Blueprint Assignment
    parameter_values str
    a JSON string to supply Blueprint Assignment parameter values.
    resource_groups str
    a JSON string to supply the Blueprint Resource Group information.
    target_subscription_id str
    The Subscription ID the Blueprint Published Version is to be applied to.
    type str
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    version_id str
    The ID of the Published Version of the blueprint to be assigned.
    blueprintName String
    The name of the blueprint assigned
    description String
    The Description on the Blueprint
    displayName String
    The display name of the blueprint
    identity Property Map
    An identity block as defined below.
    location String
    The Azure location of the Assignment.
    lockExcludeActions List<String>
    a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
    lockExcludePrincipals List<String>
    a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
    lockMode String
    The locking mode of the Blueprint Assignment. One of None (Default), AllResourcesReadOnly, or AllResourcesDoNotDelete.
    name String
    The name of the Blueprint Assignment
    parameterValues String
    a JSON string to supply Blueprint Assignment parameter values.
    resourceGroups String
    a JSON string to supply the Blueprint Resource Group information.
    targetSubscriptionId String
    The Subscription ID the Blueprint Published Version is to be applied to.
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    versionId String
    The ID of the Published Version of the blueprint to be assigned.

    Supporting Types

    AssignmentIdentity, AssignmentIdentityArgs

    IdentityIds List<string>
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    IdentityIds []string
    Type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    identityIds List<String>
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    identityIds string[]
    type string
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    identity_ids Sequence[str]
    type str
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.
    identityIds List<String>
    type String
    The Identity type for the Managed Service Identity. Currently only UserAssigned is supported.

    Import

    Azure Blueprint Assignments can be imported using the resource id, e.g.

     $ pulumi import azure:blueprint/assignment:Assignment example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.