Blueprint Args
data class BlueprintArgs(val blueprintName: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val parameters: Output<Map<String, ParameterDefinitionArgs>>? = null, val resourceGroups: Output<Map<String, ResourceGroupDefinitionArgs>>? = null, val resourceScope: Output<String>? = null, val targetScope: Output<Either<String, BlueprintTargetScope>>? = null, val versions: Output<Any>? = null) : ConvertibleToJava<BlueprintArgs>
Represents a Blueprint definition. 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
ManagementGroupBlueprint
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
{
BlueprintName = "simpleBlueprint",
Description = "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "force cost center tag for all resources under given subscription.",
Type = AzureNative.Blueprint.TemplateParameterType.@String,
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "assign owners to subscription along with blueprint assignment.",
Type = AzureNative.Blueprint.TemplateParameterType.Array,
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "storage account type.",
Type = AzureNative.Blueprint.TemplateParameterType.@String,
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
{
Description = "Contains storageAccounts that collect all shoebox logs.",
DisplayName = "storage resource group",
} },
},
ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
});
});
Content copied to clipboard
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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
BlueprintName: pulumi.String("simpleBlueprint"),
Description: pulumi.String("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
Parameters: blueprint.ParameterDefinitionMap{
"costCenter": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("force cost center tag for all resources under given subscription."),
Type: pulumi.String(blueprint.TemplateParameterTypeString),
},
"owners": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("assign owners to subscription along with blueprint assignment."),
Type: pulumi.String(blueprint.TemplateParameterTypeArray),
},
"storageAccountType": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("storage account type."),
Type: pulumi.String(blueprint.TemplateParameterTypeString),
},
},
ResourceGroups: blueprint.ResourceGroupDefinitionMap{
"storageRG": &blueprint.ResourceGroupDefinitionArgs{
Description: pulumi.String("Contains storageAccounts that collect all shoebox logs."),
DisplayName: pulumi.String("storage resource group"),
},
},
ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Blueprint;
import com.pulumi.azurenative.blueprint.BlueprintArgs;
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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
.blueprintName("simpleBlueprint")
.description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.ofEntries(
Map.entry("displayName", "force cost center tag for all resources under given subscription."),
Map.entry("type", "string")
)),
Map.entry("owners", Map.ofEntries(
Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
Map.entry("type", "array")
)),
Map.entry("storageAccountType", Map.ofEntries(
Map.entry("displayName", "storage account type."),
Map.entry("type", "string")
))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
Map.entry("displayName", "storage resource group")
)))
.resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
.targetScope("subscription")
.build());
}
}
Content copied to clipboard
ResourceGroupWithTags
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
{
BlueprintName = "simpleBlueprint",
Description = "An example blueprint containing an RG with two tags.",
ResourceGroups =
{
{ "myRGName", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
{
DisplayName = "My Resource Group",
Location = "westus",
Name = "myRGName",
Tags =
{
{ "costcenter", "123456" },
{ "nameOnlyTag", "" },
},
} },
},
ResourceScope = "providers/Microsoft.Management/managementGroups/{ManagementGroupId}",
TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
});
});
Content copied to clipboard
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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
BlueprintName: pulumi.String("simpleBlueprint"),
Description: pulumi.String("An example blueprint containing an RG with two tags."),
ResourceGroups: blueprint.ResourceGroupDefinitionMap{
"myRGName": &blueprint.ResourceGroupDefinitionArgs{
DisplayName: pulumi.String("My Resource Group"),
Location: pulumi.String("westus"),
Name: pulumi.String("myRGName"),
Tags: pulumi.StringMap{
"costcenter": pulumi.String("123456"),
"nameOnlyTag": pulumi.String(""),
},
},
},
ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/{ManagementGroupId}"),
TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Blueprint;
import com.pulumi.azurenative.blueprint.BlueprintArgs;
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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
.blueprintName("simpleBlueprint")
.description("An example blueprint containing an RG with two tags.")
.resourceGroups(Map.of("myRGName", Map.ofEntries(
Map.entry("displayName", "My Resource Group"),
Map.entry("location", "westus"),
Map.entry("name", "myRGName"),
Map.entry("tags", Map.ofEntries(
Map.entry("costcenter", "123456"),
Map.entry("nameOnlyTag", "")
))
)))
.resourceScope("providers/Microsoft.Management/managementGroups/{ManagementGroupId}")
.targetScope("subscription")
.build());
}
}
Content copied to clipboard
SubscriptionBlueprint
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blueprint = new AzureNative.Blueprint.Blueprint("blueprint", new()
{
BlueprintName = "simpleBlueprint",
Description = "blueprint contains all artifact kinds {'template', 'rbac', 'policy'}",
Parameters =
{
{ "costCenter", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "force cost center tag for all resources under given subscription.",
Type = AzureNative.Blueprint.TemplateParameterType.@String,
} },
{ "owners", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "assign owners to subscription along with blueprint assignment.",
Type = AzureNative.Blueprint.TemplateParameterType.Array,
} },
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterDefinitionArgs
{
DisplayName = "storage account type.",
Type = AzureNative.Blueprint.TemplateParameterType.@String,
} },
},
ResourceGroups =
{
{ "storageRG", new AzureNative.Blueprint.Inputs.ResourceGroupDefinitionArgs
{
Description = "Contains storageAccounts that collect all shoebox logs.",
DisplayName = "storage resource group",
} },
},
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
TargetScope = AzureNative.Blueprint.BlueprintTargetScope.Subscription,
});
});
Content copied to clipboard
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.NewBlueprint(ctx, "blueprint", &blueprint.BlueprintArgs{
BlueprintName: pulumi.String("simpleBlueprint"),
Description: pulumi.String("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}"),
Parameters: blueprint.ParameterDefinitionMap{
"costCenter": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("force cost center tag for all resources under given subscription."),
Type: pulumi.String(blueprint.TemplateParameterTypeString),
},
"owners": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("assign owners to subscription along with blueprint assignment."),
Type: pulumi.String(blueprint.TemplateParameterTypeArray),
},
"storageAccountType": &blueprint.ParameterDefinitionArgs{
DisplayName: pulumi.String("storage account type."),
Type: pulumi.String(blueprint.TemplateParameterTypeString),
},
},
ResourceGroups: blueprint.ResourceGroupDefinitionMap{
"storageRG": &blueprint.ResourceGroupDefinitionArgs{
Description: pulumi.String("Contains storageAccounts that collect all shoebox logs."),
DisplayName: pulumi.String("storage resource group"),
},
},
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
TargetScope: pulumi.String(blueprint.BlueprintTargetScopeSubscription),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.blueprint.Blueprint;
import com.pulumi.azurenative.blueprint.BlueprintArgs;
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 blueprint = new Blueprint("blueprint", BlueprintArgs.builder()
.blueprintName("simpleBlueprint")
.description("blueprint contains all artifact kinds {'template', 'rbac', 'policy'}")
.parameters(Map.ofEntries(
Map.entry("costCenter", Map.ofEntries(
Map.entry("displayName", "force cost center tag for all resources under given subscription."),
Map.entry("type", "string")
)),
Map.entry("owners", Map.ofEntries(
Map.entry("displayName", "assign owners to subscription along with blueprint assignment."),
Map.entry("type", "array")
)),
Map.entry("storageAccountType", Map.ofEntries(
Map.entry("displayName", "storage account type."),
Map.entry("type", "string")
))
))
.resourceGroups(Map.of("storageRG", Map.ofEntries(
Map.entry("description", "Contains storageAccounts that collect all shoebox logs."),
Map.entry("displayName", "storage resource group")
)))
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.targetScope("subscription")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:blueprint:Blueprint simpleBlueprint /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(blueprintName: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, parameters: Output<Map<String, ParameterDefinitionArgs>>? = null, resourceGroups: Output<Map<String, ResourceGroupDefinitionArgs>>? = null, resourceScope: Output<String>? = null, targetScope: Output<Either<String, BlueprintTargetScope>>? = null, versions: Output<Any>? = null)
Properties
Link copied to clipboard
Name of the blueprint definition.
Link copied to clipboard
Multi-line explain this resource.
Link copied to clipboard
One-liner string explain this resource.
Link copied to clipboard
Parameters required by this blueprint definition.
Link copied to clipboard
Resource group placeholders defined by this blueprint definition.
Link copied to clipboard
The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
Link copied to clipboard
The scope where this blueprint definition can be assigned.