AssignmentArgs

data class AssignmentArgs(val assignmentName: Output<String>? = null, val blueprintId: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val location: Output<String>? = null, val locks: Output<AssignmentLockSettingsArgs>? = null, val parameters: Output<Map<String, ParameterValueArgs>>? = null, val resourceGroups: Output<Map<String, ResourceGroupValueArgs>>? = null, val resourceScope: Output<String>? = null, val scope: Output<String>? = null) : ConvertibleToJava<AssignmentArgs>

Represents a blueprint assignment. Uses Azure REST API version 2018-11-01-preview. In version 1.x of the Azure Native provider, it used API version 2018-11-01-preview.

Example Usage

Assignment with system-assigned managed identity at management group scope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.Blueprint.ManagedServiceIdentityType.SystemAssigned,
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "managementGroups/ContosoOnlineGroup",
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String(blueprint.ManagedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
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) {
var assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(ManagedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("managementGroups/ContosoOnlineGroup")
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}

Assignment with system-assigned managed identity at subscription scope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.Blueprint.ManagedServiceIdentityType.SystemAssigned,
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String(blueprint.ManagedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
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) {
var assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(ManagedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}

Assignment with user-assigned managed identity at management group scope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.Blueprint.ManagedServiceIdentityType.UserAssigned,
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
},
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "managementGroups/ContosoOnlineGroup",
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String(blueprint.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": &blueprint.UserAssignedIdentityArgs{},
},
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("managementGroups/ContosoOnlineGroup"),
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
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) {
var assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(ManagedServiceIdentityArgs.builder()
.type("UserAssigned")
.userAssignedIdentities(Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
.build())
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("managementGroups/ContosoOnlineGroup")
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}

Assignment with user-assigned managed identity at subscription scope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var assignment = new AzureNative.Blueprint.Assignment("assignment", new()
{
AssignmentName = "assignSimpleBlueprint",
BlueprintId = "/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint",
Description = "enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.",
Identity = new AzureNative.Blueprint.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.Blueprint.ManagedServiceIdentityType.UserAssigned,
UserAssignedIdentities =
{
{ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", null },
},
},
Location = "eastus",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Contoso/Online/Shopping/Production",
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = new[]
{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "Standard_LRS",
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupValueArgs
{
Location = "eastus",
Name = "defaultRG",
} },
},
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
package main
import (
blueprint "github.com/pulumi/pulumi-azure-native-sdk/blueprint/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blueprint.NewAssignment(ctx, "assignment", &blueprint.AssignmentArgs{
AssignmentName: pulumi.String("assignSimpleBlueprint"),
BlueprintId: pulumi.String("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint"),
Description: pulumi.String("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription."),
Identity: &blueprint.ManagedServiceIdentityArgs{
Type: pulumi.String(blueprint.ManagedServiceIdentityTypeUserAssigned),
UserAssignedIdentities: blueprint.UserAssignedIdentityMap{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity": &blueprint.UserAssignedIdentityArgs{},
},
},
Location: pulumi.String("eastus"),
Parameters: blueprint.ParameterValueMap{
"costCenter": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Contoso/Online/Shopping/Production"),
},
"owners": &blueprint.ParameterValueArgs{
Value: pulumi.Any{
"johnDoe@contoso.com",
"johnsteam@contoso.com",
},
},
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("Standard_LRS"),
},
},
ResourceGroups: blueprint.ResourceGroupValueMap{
"storageRG": &blueprint.ResourceGroupValueArgs{
Location: pulumi.String("eastus"),
Name: pulumi.String("defaultRG"),
},
},
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Assignment;
import com.pulumi.azurenative.blueprint.AssignmentArgs;
import com.pulumi.azurenative.blueprint.inputs.ManagedServiceIdentityArgs;
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) {
var assignment = new Assignment("assignment", AssignmentArgs.builder()
.assignmentName("assignSimpleBlueprint")
.blueprintId("/providers/Microsoft.Management/managementGroups/ContosoOnlineGroup/providers/Microsoft.Blueprint/blueprints/simpleBlueprint")
.description("enforce pre-defined simpleBlueprint to this XXXXXXXX subscription.")
.identity(ManagedServiceIdentityArgs.builder()
.type("UserAssigned")
.userAssignedIdentities(Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", ))
.build())
.location("eastus")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.of("value", "Contoso/Online/Shopping/Production")),
Map.entry("owners", Map.of("value",
"johnDoe@contoso.com",
"johnsteam@contoso.com")),
Map.entry("storageAccountType", Map.of("value", "Standard_LRS"))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("location", "eastus"),
Map.entry("name", "defaultRG")
)))
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:blueprint:Assignment assignSimpleBlueprint /{resourceScope}/providers/Microsoft.Blueprint/blueprintAssignments/{assignmentName}

Constructors

Link copied to clipboard
constructor(assignmentName: Output<String>? = null, blueprintId: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, location: Output<String>? = null, locks: Output<AssignmentLockSettingsArgs>? = null, parameters: Output<Map<String, ParameterValueArgs>>? = null, resourceGroups: Output<Map<String, ResourceGroupValueArgs>>? = null, resourceScope: Output<String>? = null, scope: Output<String>? = null)

Properties

Link copied to clipboard
val assignmentName: Output<String>? = null

Name of the blueprint assignment.

Link copied to clipboard
val blueprintId: Output<String>? = null

ID of the published version of a blueprint definition.

Link copied to clipboard
val description: Output<String>? = null

Multi-line explain this resource.

Link copied to clipboard
val displayName: Output<String>? = null

One-liner string explain this resource.

Link copied to clipboard

Managed identity for this blueprint assignment.

Link copied to clipboard
val location: Output<String>? = null

The location of this blueprint assignment.

Link copied to clipboard
val locks: Output<AssignmentLockSettingsArgs>? = null

Defines how resources deployed by a blueprint assignment are locked.

Link copied to clipboard
val parameters: Output<Map<String, ParameterValueArgs>>? = null

Blueprint assignment parameter values.

Link copied to clipboard

Names and locations of resource group placeholders.

Link copied to clipboard
val resourceScope: Output<String>? = null

The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').

Link copied to clipboard
val scope: Output<String>? = null

The target subscription scope of the blueprint assignment (format: '/subscriptions/{subscriptionId}'). For management group level assignments, the property is required.

Functions

Link copied to clipboard
open override fun toJava(): AssignmentArgs