azure-native.blueprint.TemplateArtifact
Explore with Pulumi AI
Blueprint artifact that deploys a Resource Manager template. Azure REST API version: 2018-11-01-preview. Prior API version in Azure Native 1.x: 2018-11-01-preview.
Example Usage
MG-ARMTemplateArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "storageTemplate",
BlueprintName = "simpleBlueprint",
Kind = "template",
Parameters =
{
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "[parameters('storageAccountType')]",
} },
},
ResourceGroup = "storageRG",
ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
Template = new Dictionary<string, object?>
{
["contentVersion"] = "1.0.0.0",
["outputs"] = new Dictionary<string, object?>
{
["storageAccountName"] = new Dictionary<string, object?>
{
["type"] = "string",
["value"] = "[variables('storageAccountName')]",
},
},
["parameters"] = new Dictionary<string, object?>
{
["storageAccountType"] = new Dictionary<string, object?>
{
["allowedValues"] = new[]
{
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
},
["defaultValue"] = "Standard_LRS",
["metadata"] = new Dictionary<string, object?>
{
["description"] = "Storage Account type",
},
["type"] = "string",
},
},
["resources"] = new[]
{
new Dictionary<string, object?>
{
["apiVersion"] = "2016-01-01",
["kind"] = "Storage",
["location"] = "[resourceGroup().location]",
["name"] = "[variables('storageAccountName')]",
["properties"] = new Dictionary<string, object?>
{
},
["sku"] = new Dictionary<string, object?>
{
["name"] = "[parameters('storageAccountType')]",
},
["type"] = "Microsoft.Storage/storageAccounts",
},
},
["variables"] = new Dictionary<string, object?>
{
["storageAccountName"] = "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
},
});
});
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("storageTemplate"),
BlueprintName: pulumi.String("simpleBlueprint"),
Kind: pulumi.String("template"),
Parameters: blueprint.ParameterValueMap{
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("[parameters('storageAccountType')]"),
},
},
ResourceGroup: pulumi.String("storageRG"),
ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
Template: pulumi.Any(map[string]interface{}{
"contentVersion": "1.0.0.0",
"outputs": map[string]interface{}{
"storageAccountName": map[string]interface{}{
"type": "string",
"value": "[variables('storageAccountName')]",
},
},
"parameters": map[string]interface{}{
"storageAccountType": map[string]interface{}{
"allowedValues": []string{
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
},
"defaultValue": "Standard_LRS",
"metadata": map[string]interface{}{
"description": "Storage Account type",
},
"type": "string",
},
},
"resources": []map[string]interface{}{
map[string]interface{}{
"apiVersion": "2016-01-01",
"kind": "Storage",
"location": "[resourceGroup().location]",
"name": "[variables('storageAccountName')]",
"properties": map[string]interface{}{},
"sku": map[string]interface{}{
"name": "[parameters('storageAccountType')]",
},
"type": "Microsoft.Storage/storageAccounts",
},
},
"variables": map[string]interface{}{
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
}),
})
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("storageTemplate")
.blueprintName("simpleBlueprint")
.kind("template")
.parameters(Map.of("storageAccountType", Map.of("value", "[parameters('storageAccountType')]")))
.resourceGroup("storageRG")
.resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
.template(Map.ofEntries(
Map.entry("contentVersion", "1.0.0.0"),
Map.entry("outputs", Map.of("storageAccountName", Map.ofEntries(
Map.entry("type", "string"),
Map.entry("value", "[variables('storageAccountName')]")
))),
Map.entry("parameters", Map.of("storageAccountType", Map.ofEntries(
Map.entry("allowedValues",
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"),
Map.entry("defaultValue", "Standard_LRS"),
Map.entry("metadata", Map.of("description", "Storage Account type")),
Map.entry("type", "string")
))),
Map.entry("resources", Map.ofEntries(
Map.entry("apiVersion", "2016-01-01"),
Map.entry("kind", "Storage"),
Map.entry("location", "[resourceGroup().location]"),
Map.entry("name", "[variables('storageAccountName')]"),
Map.entry("properties", ),
Map.entry("sku", Map.of("name", "[parameters('storageAccountType')]")),
Map.entry("type", "Microsoft.Storage/storageAccounts")
)),
Map.entry("variables", Map.of("storageAccountName", "[concat(uniquestring(resourceGroup().id), 'standardsa')]"))
))
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="storageTemplate",
blueprint_name="simpleBlueprint",
kind="template",
parameters={
"storageAccountType": {
"value": "[parameters('storageAccountType')]",
},
},
resource_group="storageRG",
resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
template={
"contentVersion": "1.0.0.0",
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]",
},
},
"parameters": {
"storageAccountType": {
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
],
"defaultValue": "Standard_LRS",
"metadata": {
"description": "Storage Account type",
},
"type": "string",
},
},
"resources": [{
"apiVersion": "2016-01-01",
"kind": "Storage",
"location": "[resourceGroup().location]",
"name": "[variables('storageAccountName')]",
"properties": {},
"sku": {
"name": "[parameters('storageAccountType')]",
},
"type": "Microsoft.Storage/storageAccounts",
}],
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
})
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "storageTemplate",
blueprintName: "simpleBlueprint",
kind: "template",
parameters: {
storageAccountType: {
value: "[parameters('storageAccountType')]",
},
},
resourceGroup: "storageRG",
resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
template: {
contentVersion: "1.0.0.0",
outputs: {
storageAccountName: {
type: "string",
value: "[variables('storageAccountName')]",
},
},
parameters: {
storageAccountType: {
allowedValues: [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
],
defaultValue: "Standard_LRS",
metadata: {
description: "Storage Account type",
},
type: "string",
},
},
resources: [{
apiVersion: "2016-01-01",
kind: "Storage",
location: "[resourceGroup().location]",
name: "[variables('storageAccountName')]",
properties: {},
sku: {
name: "[parameters('storageAccountType')]",
},
type: "Microsoft.Storage/storageAccounts",
}],
variables: {
storageAccountName: "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
},
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: storageTemplate
blueprintName: simpleBlueprint
kind: template
parameters:
storageAccountType:
value: '[parameters(''storageAccountType'')]'
resourceGroup: storageRG
resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
template:
contentVersion: 1.0.0.0
outputs:
storageAccountName:
type: string
value: '[variables(''storageAccountName'')]'
parameters:
storageAccountType:
allowedValues:
- Standard_LRS
- Standard_GRS
- Standard_ZRS
- Premium_LRS
defaultValue: Standard_LRS
metadata:
description: Storage Account type
type: string
resources:
- apiVersion: 2016-01-01
kind: Storage
location: '[resourceGroup().location]'
name: '[variables(''storageAccountName'')]'
properties: {}
sku:
name: '[parameters(''storageAccountType'')]'
type: Microsoft.Storage/storageAccounts
variables:
storageAccountName: '[concat(uniquestring(resourceGroup().id), ''standardsa'')]'
MG-PolicyAssignmentArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "costCenterPolicy",
BlueprintName = "simpleBlueprint",
ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
});
});
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("costCenterPolicy"),
BlueprintName: pulumi.String("simpleBlueprint"),
ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
})
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("costCenterPolicy")
.blueprintName("simpleBlueprint")
.resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="costCenterPolicy",
blueprint_name="simpleBlueprint",
resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "costCenterPolicy",
blueprintName: "simpleBlueprint",
resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: costCenterPolicy
blueprintName: simpleBlueprint
resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
MG-RoleAssignmentArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "ownerAssignment",
BlueprintName = "simpleBlueprint",
ResourceScope = "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
});
});
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("ownerAssignment"),
BlueprintName: pulumi.String("simpleBlueprint"),
ResourceScope: pulumi.String("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup"),
})
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("ownerAssignment")
.blueprintName("simpleBlueprint")
.resourceScope("providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="ownerAssignment",
blueprint_name="simpleBlueprint",
resource_scope="providers/Microsoft.Management/managementGroups/ContosoOnlineGroup")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "ownerAssignment",
blueprintName: "simpleBlueprint",
resourceScope: "providers/Microsoft.Management/managementGroups/ContosoOnlineGroup",
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: ownerAssignment
blueprintName: simpleBlueprint
resourceScope: providers/Microsoft.Management/managementGroups/ContosoOnlineGroup
Sub-ARMTemplateArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "storageTemplate",
BlueprintName = "simpleBlueprint",
Kind = "template",
Parameters =
{
{ "storageAccountType", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Value = "[parameters('storageAccountType')]",
} },
},
ResourceGroup = "storageRG",
ResourceScope = "subscriptions/00000000-0000-0000-0000-000000000000",
Template = new Dictionary<string, object?>
{
["contentVersion"] = "1.0.0.0",
["outputs"] = new Dictionary<string, object?>
{
["storageAccountName"] = new Dictionary<string, object?>
{
["type"] = "string",
["value"] = "[variables('storageAccountName')]",
},
},
["parameters"] = new Dictionary<string, object?>
{
["storageAccountType"] = new Dictionary<string, object?>
{
["allowedValues"] = new[]
{
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
},
["defaultValue"] = "Standard_LRS",
["metadata"] = new Dictionary<string, object?>
{
["description"] = "Storage Account type",
},
["type"] = "string",
},
},
["resources"] = new[]
{
new Dictionary<string, object?>
{
["apiVersion"] = "2016-01-01",
["kind"] = "Storage",
["location"] = "[resourceGroup().location]",
["name"] = "[variables('storageAccountName')]",
["properties"] = new Dictionary<string, object?>
{
},
["sku"] = new Dictionary<string, object?>
{
["name"] = "[parameters('storageAccountType')]",
},
["type"] = "Microsoft.Storage/storageAccounts",
},
},
["variables"] = new Dictionary<string, object?>
{
["storageAccountName"] = "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
},
});
});
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("storageTemplate"),
BlueprintName: pulumi.String("simpleBlueprint"),
Kind: pulumi.String("template"),
Parameters: blueprint.ParameterValueMap{
"storageAccountType": &blueprint.ParameterValueArgs{
Value: pulumi.Any("[parameters('storageAccountType')]"),
},
},
ResourceGroup: pulumi.String("storageRG"),
ResourceScope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
Template: pulumi.Any(map[string]interface{}{
"contentVersion": "1.0.0.0",
"outputs": map[string]interface{}{
"storageAccountName": map[string]interface{}{
"type": "string",
"value": "[variables('storageAccountName')]",
},
},
"parameters": map[string]interface{}{
"storageAccountType": map[string]interface{}{
"allowedValues": []string{
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
},
"defaultValue": "Standard_LRS",
"metadata": map[string]interface{}{
"description": "Storage Account type",
},
"type": "string",
},
},
"resources": []map[string]interface{}{
map[string]interface{}{
"apiVersion": "2016-01-01",
"kind": "Storage",
"location": "[resourceGroup().location]",
"name": "[variables('storageAccountName')]",
"properties": map[string]interface{}{},
"sku": map[string]interface{}{
"name": "[parameters('storageAccountType')]",
},
"type": "Microsoft.Storage/storageAccounts",
},
},
"variables": map[string]interface{}{
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
}),
})
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("storageTemplate")
.blueprintName("simpleBlueprint")
.kind("template")
.parameters(Map.of("storageAccountType", Map.of("value", "[parameters('storageAccountType')]")))
.resourceGroup("storageRG")
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.template(Map.ofEntries(
Map.entry("contentVersion", "1.0.0.0"),
Map.entry("outputs", Map.of("storageAccountName", Map.ofEntries(
Map.entry("type", "string"),
Map.entry("value", "[variables('storageAccountName')]")
))),
Map.entry("parameters", Map.of("storageAccountType", Map.ofEntries(
Map.entry("allowedValues",
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS"),
Map.entry("defaultValue", "Standard_LRS"),
Map.entry("metadata", Map.of("description", "Storage Account type")),
Map.entry("type", "string")
))),
Map.entry("resources", Map.ofEntries(
Map.entry("apiVersion", "2016-01-01"),
Map.entry("kind", "Storage"),
Map.entry("location", "[resourceGroup().location]"),
Map.entry("name", "[variables('storageAccountName')]"),
Map.entry("properties", ),
Map.entry("sku", Map.of("name", "[parameters('storageAccountType')]")),
Map.entry("type", "Microsoft.Storage/storageAccounts")
)),
Map.entry("variables", Map.of("storageAccountName", "[concat(uniquestring(resourceGroup().id), 'standardsa')]"))
))
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="storageTemplate",
blueprint_name="simpleBlueprint",
kind="template",
parameters={
"storageAccountType": {
"value": "[parameters('storageAccountType')]",
},
},
resource_group="storageRG",
resource_scope="subscriptions/00000000-0000-0000-0000-000000000000",
template={
"contentVersion": "1.0.0.0",
"outputs": {
"storageAccountName": {
"type": "string",
"value": "[variables('storageAccountName')]",
},
},
"parameters": {
"storageAccountType": {
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
],
"defaultValue": "Standard_LRS",
"metadata": {
"description": "Storage Account type",
},
"type": "string",
},
},
"resources": [{
"apiVersion": "2016-01-01",
"kind": "Storage",
"location": "[resourceGroup().location]",
"name": "[variables('storageAccountName')]",
"properties": {},
"sku": {
"name": "[parameters('storageAccountType')]",
},
"type": "Microsoft.Storage/storageAccounts",
}],
"variables": {
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
})
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "storageTemplate",
blueprintName: "simpleBlueprint",
kind: "template",
parameters: {
storageAccountType: {
value: "[parameters('storageAccountType')]",
},
},
resourceGroup: "storageRG",
resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
template: {
contentVersion: "1.0.0.0",
outputs: {
storageAccountName: {
type: "string",
value: "[variables('storageAccountName')]",
},
},
parameters: {
storageAccountType: {
allowedValues: [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Premium_LRS",
],
defaultValue: "Standard_LRS",
metadata: {
description: "Storage Account type",
},
type: "string",
},
},
resources: [{
apiVersion: "2016-01-01",
kind: "Storage",
location: "[resourceGroup().location]",
name: "[variables('storageAccountName')]",
properties: {},
sku: {
name: "[parameters('storageAccountType')]",
},
type: "Microsoft.Storage/storageAccounts",
}],
variables: {
storageAccountName: "[concat(uniquestring(resourceGroup().id), 'standardsa')]",
},
},
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: storageTemplate
blueprintName: simpleBlueprint
kind: template
parameters:
storageAccountType:
value: '[parameters(''storageAccountType'')]'
resourceGroup: storageRG
resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
template:
contentVersion: 1.0.0.0
outputs:
storageAccountName:
type: string
value: '[variables(''storageAccountName'')]'
parameters:
storageAccountType:
allowedValues:
- Standard_LRS
- Standard_GRS
- Standard_ZRS
- Premium_LRS
defaultValue: Standard_LRS
metadata:
description: Storage Account type
type: string
resources:
- apiVersion: 2016-01-01
kind: Storage
location: '[resourceGroup().location]'
name: '[variables(''storageAccountName'')]'
properties: {}
sku:
name: '[parameters(''storageAccountType'')]'
type: Microsoft.Storage/storageAccounts
variables:
storageAccountName: '[concat(uniquestring(resourceGroup().id), ''standardsa'')]'
Sub-PolicyAssignmentArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "costCenterPolicy",
BlueprintName = "simpleBlueprint",
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("costCenterPolicy"),
BlueprintName: pulumi.String("simpleBlueprint"),
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("costCenterPolicy")
.blueprintName("simpleBlueprint")
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="costCenterPolicy",
blueprint_name="simpleBlueprint",
resource_scope="subscriptions/00000000-0000-0000-0000-000000000000")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "costCenterPolicy",
blueprintName: "simpleBlueprint",
resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: costCenterPolicy
blueprintName: simpleBlueprint
resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
Sub-RoleAssignmentArtifact
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var templateArtifact = new AzureNative.Blueprint.TemplateArtifact("templateArtifact", new()
{
ArtifactName = "ownerAssignment",
BlueprintName = "simpleBlueprint",
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.NewTemplateArtifact(ctx, "templateArtifact", &blueprint.TemplateArtifactArgs{
ArtifactName: pulumi.String("ownerAssignment"),
BlueprintName: pulumi.String("simpleBlueprint"),
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.TemplateArtifact;
import com.pulumi.azurenative.blueprint.TemplateArtifactArgs;
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 templateArtifact = new TemplateArtifact("templateArtifact", TemplateArtifactArgs.builder()
.artifactName("ownerAssignment")
.blueprintName("simpleBlueprint")
.resourceScope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
template_artifact = azure_native.blueprint.TemplateArtifact("templateArtifact",
artifact_name="ownerAssignment",
blueprint_name="simpleBlueprint",
resource_scope="subscriptions/00000000-0000-0000-0000-000000000000")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const templateArtifact = new azure_native.blueprint.TemplateArtifact("templateArtifact", {
artifactName: "ownerAssignment",
blueprintName: "simpleBlueprint",
resourceScope: "subscriptions/00000000-0000-0000-0000-000000000000",
});
resources:
templateArtifact:
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: ownerAssignment
blueprintName: simpleBlueprint
resourceScope: subscriptions/00000000-0000-0000-0000-000000000000
Create TemplateArtifact Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TemplateArtifact(name: string, args: TemplateArtifactArgs, opts?: CustomResourceOptions);
@overload
def TemplateArtifact(resource_name: str,
args: TemplateArtifactArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TemplateArtifact(resource_name: str,
opts: Optional[ResourceOptions] = None,
blueprint_name: Optional[str] = None,
parameters: Optional[Mapping[str, ParameterValueArgs]] = None,
resource_scope: Optional[str] = None,
template: Optional[Any] = None,
artifact_name: Optional[str] = None,
depends_on: Optional[Sequence[str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
resource_group: Optional[str] = None)
func NewTemplateArtifact(ctx *Context, name string, args TemplateArtifactArgs, opts ...ResourceOption) (*TemplateArtifact, error)
public TemplateArtifact(string name, TemplateArtifactArgs args, CustomResourceOptions? opts = null)
public TemplateArtifact(String name, TemplateArtifactArgs args)
public TemplateArtifact(String name, TemplateArtifactArgs args, CustomResourceOptions options)
type: azure-native:blueprint:TemplateArtifact
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 TemplateArtifactArgs
- 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 TemplateArtifactArgs
- 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 TemplateArtifactArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateArtifactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TemplateArtifactArgs
- 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 templateArtifactResource = new AzureNative.Blueprint.TemplateArtifact("templateArtifactResource", new()
{
BlueprintName = "string",
Kind = "string",
Parameters =
{
{ "string", new AzureNative.Blueprint.Inputs.ParameterValueArgs
{
Reference = new AzureNative.Blueprint.Inputs.SecretValueReferenceArgs
{
KeyVault = new AzureNative.Blueprint.Inputs.KeyVaultReferenceArgs
{
Id = "string",
},
SecretName = "string",
SecretVersion = "string",
},
Value = "any",
} },
},
ResourceScope = "string",
Template = "any",
ArtifactName = "string",
DependsOn = new[]
{
"string",
},
Description = "string",
DisplayName = "string",
ResourceGroup = "string",
});
example, err := blueprint.NewTemplateArtifact(ctx, "templateArtifactResource", &blueprint.TemplateArtifactArgs{
BlueprintName: pulumi.String("string"),
Kind: pulumi.String("string"),
Parameters: blueprint.ParameterValueMap{
"string": &blueprint.ParameterValueArgs{
Reference: &blueprint.SecretValueReferenceArgs{
KeyVault: &blueprint.KeyVaultReferenceArgs{
Id: pulumi.String("string"),
},
SecretName: pulumi.String("string"),
SecretVersion: pulumi.String("string"),
},
Value: pulumi.Any("any"),
},
},
ResourceScope: pulumi.String("string"),
Template: pulumi.Any("any"),
ArtifactName: pulumi.String("string"),
DependsOn: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
ResourceGroup: pulumi.String("string"),
})
var templateArtifactResource = new TemplateArtifact("templateArtifactResource", TemplateArtifactArgs.builder()
.blueprintName("string")
.kind("string")
.parameters(Map.of("string", Map.ofEntries(
Map.entry("reference", Map.ofEntries(
Map.entry("keyVault", Map.of("id", "string")),
Map.entry("secretName", "string"),
Map.entry("secretVersion", "string")
)),
Map.entry("value", "any")
)))
.resourceScope("string")
.template("any")
.artifactName("string")
.dependsOn("string")
.description("string")
.displayName("string")
.resourceGroup("string")
.build());
template_artifact_resource = azure_native.blueprint.TemplateArtifact("templateArtifactResource",
blueprint_name="string",
kind="string",
parameters={
"string": {
"reference": {
"key_vault": {
"id": "string",
},
"secret_name": "string",
"secret_version": "string",
},
"value": "any",
},
},
resource_scope="string",
template="any",
artifact_name="string",
depends_on=["string"],
description="string",
display_name="string",
resource_group="string")
const templateArtifactResource = new azure_native.blueprint.TemplateArtifact("templateArtifactResource", {
blueprintName: "string",
kind: "string",
parameters: {
string: {
reference: {
keyVault: {
id: "string",
},
secretName: "string",
secretVersion: "string",
},
value: "any",
},
},
resourceScope: "string",
template: "any",
artifactName: "string",
dependsOn: ["string"],
description: "string",
displayName: "string",
resourceGroup: "string",
});
type: azure-native:blueprint:TemplateArtifact
properties:
artifactName: string
blueprintName: string
dependsOn:
- string
description: string
displayName: string
kind: string
parameters:
string:
reference:
keyVault:
id: string
secretName: string
secretVersion: string
value: any
resourceGroup: string
resourceScope: string
template: any
TemplateArtifact 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 TemplateArtifact resource accepts the following input properties:
- Blueprint
Name string - Name of the blueprint definition.
- Parameters
Dictionary<string, Pulumi.
Azure Native. Blueprint. Inputs. Parameter Value Args> - Resource Manager template blueprint artifact parameter values.
- Resource
Scope string - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- Template object
- The Resource Manager template blueprint artifact body.
- Artifact
Name string - Name of the blueprint artifact.
- Depends
On List<string> - Artifacts which need to be deployed before the specified artifact.
- Description string
- Multi-line explain this resource.
- Display
Name string - One-liner string explain this resource.
- Resource
Group string - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
- Blueprint
Name string - Name of the blueprint definition.
- Parameters
map[string]Parameter
Value Args - Resource Manager template blueprint artifact parameter values.
- Resource
Scope string - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- Template interface{}
- The Resource Manager template blueprint artifact body.
- Artifact
Name string - Name of the blueprint artifact.
- Depends
On []string - Artifacts which need to be deployed before the specified artifact.
- Description string
- Multi-line explain this resource.
- Display
Name string - One-liner string explain this resource.
- Resource
Group string - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
- blueprint
Name String - Name of the blueprint definition.
- parameters
Map<String,Parameter
Value Args> - Resource Manager template blueprint artifact parameter values.
- resource
Scope String - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- template Object
- The Resource Manager template blueprint artifact body.
- artifact
Name String - Name of the blueprint artifact.
- depends
On List<String> - Artifacts which need to be deployed before the specified artifact.
- description String
- Multi-line explain this resource.
- display
Name String - One-liner string explain this resource.
- resource
Group String - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
- blueprint
Name string - Name of the blueprint definition.
- parameters
{[key: string]: Parameter
Value Args} - Resource Manager template blueprint artifact parameter values.
- resource
Scope string - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- template any
- The Resource Manager template blueprint artifact body.
- artifact
Name string - Name of the blueprint artifact.
- depends
On string[] - Artifacts which need to be deployed before the specified artifact.
- description string
- Multi-line explain this resource.
- display
Name string - One-liner string explain this resource.
- resource
Group string - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
- blueprint_
name str - Name of the blueprint definition.
- parameters
Mapping[str, Parameter
Value Args] - Resource Manager template blueprint artifact parameter values.
- resource_
scope str - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- template Any
- The Resource Manager template blueprint artifact body.
- artifact_
name str - Name of the blueprint artifact.
- depends_
on Sequence[str] - Artifacts which need to be deployed before the specified artifact.
- description str
- Multi-line explain this resource.
- display_
name str - One-liner string explain this resource.
- resource_
group str - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
- blueprint
Name String - Name of the blueprint definition.
- parameters Map<Property Map>
- Resource Manager template blueprint artifact parameter values.
- resource
Scope String - The scope of the resource. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}').
- template Any
- The Resource Manager template blueprint artifact body.
- artifact
Name String - Name of the blueprint artifact.
- depends
On List<String> - Artifacts which need to be deployed before the specified artifact.
- description String
- Multi-line explain this resource.
- display
Name String - One-liner string explain this resource.
- resource
Group String - If applicable, the name of the resource group placeholder to which the Resource Manager template blueprint artifact will be deployed.
Outputs
All input properties are implicitly available as output properties. Additionally, the TemplateArtifact resource produces the following output properties:
Supporting Types
KeyVaultReference, KeyVaultReferenceArgs
- Id string
- Azure resource ID of the Key Vault.
- Id string
- Azure resource ID of the Key Vault.
- id String
- Azure resource ID of the Key Vault.
- id string
- Azure resource ID of the Key Vault.
- id str
- Azure resource ID of the Key Vault.
- id String
- Azure resource ID of the Key Vault.
KeyVaultReferenceResponse, KeyVaultReferenceResponseArgs
- Id string
- Azure resource ID of the Key Vault.
- Id string
- Azure resource ID of the Key Vault.
- id String
- Azure resource ID of the Key Vault.
- id string
- Azure resource ID of the Key Vault.
- id str
- Azure resource ID of the Key Vault.
- id String
- Azure resource ID of the Key Vault.
ParameterValue, ParameterValueArgs
- Reference
Pulumi.
Azure Native. Blueprint. Inputs. Secret Value Reference - Parameter value as reference type.
- Value object
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- Reference
Secret
Value Reference - Parameter value as reference type.
- Value interface{}
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference - Parameter value as reference type.
- value Object
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference - Parameter value as reference type.
- value any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference - Parameter value as reference type.
- value Any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference Property Map
- Parameter value as reference type.
- value Any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
ParameterValueResponse, ParameterValueResponseArgs
- Reference
Pulumi.
Azure Native. Blueprint. Inputs. Secret Value Reference Response - Parameter value as reference type.
- Value object
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- Reference
Secret
Value Reference Response - Parameter value as reference type.
- Value interface{}
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference Response - Parameter value as reference type.
- value Object
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference Response - Parameter value as reference type.
- value any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference
Secret
Value Reference Response - Parameter value as reference type.
- value Any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
- reference Property Map
- Parameter value as reference type.
- value Any
- Parameter value. Any valid JSON value is allowed including objects, arrays, strings, numbers and booleans.
SecretValueReference, SecretValueReferenceArgs
- Key
Vault Pulumi.Azure Native. Blueprint. Inputs. Key Vault Reference - Specifies the reference to a given Azure Key Vault.
- Secret
Name string - Name of the secret.
- Secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- Key
Vault KeyVault Reference - Specifies the reference to a given Azure Key Vault.
- Secret
Name string - Name of the secret.
- Secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault KeyVault Reference - Specifies the reference to a given Azure Key Vault.
- secret
Name String - Name of the secret.
- secret
Version String - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault KeyVault Reference - Specifies the reference to a given Azure Key Vault.
- secret
Name string - Name of the secret.
- secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- key_
vault KeyVault Reference - Specifies the reference to a given Azure Key Vault.
- secret_
name str - Name of the secret.
- secret_
version str - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault Property Map - Specifies the reference to a given Azure Key Vault.
- secret
Name String - Name of the secret.
- secret
Version String - The version of the secret to use. If left blank, the latest version of the secret is used.
SecretValueReferenceResponse, SecretValueReferenceResponseArgs
- Key
Vault Pulumi.Azure Native. Blueprint. Inputs. Key Vault Reference Response - Specifies the reference to a given Azure Key Vault.
- Secret
Name string - Name of the secret.
- Secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- Key
Vault KeyVault Reference Response - Specifies the reference to a given Azure Key Vault.
- Secret
Name string - Name of the secret.
- Secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault KeyVault Reference Response - Specifies the reference to a given Azure Key Vault.
- secret
Name String - Name of the secret.
- secret
Version String - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault KeyVault Reference Response - Specifies the reference to a given Azure Key Vault.
- secret
Name string - Name of the secret.
- secret
Version string - The version of the secret to use. If left blank, the latest version of the secret is used.
- key_
vault KeyVault Reference Response - Specifies the reference to a given Azure Key Vault.
- secret_
name str - Name of the secret.
- secret_
version str - The version of the secret to use. If left blank, the latest version of the secret is used.
- key
Vault Property Map - Specifies the reference to a given Azure Key Vault.
- secret
Name String - Name of the secret.
- secret
Version String - The version of the secret to use. If left blank, the latest version of the secret is used.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:blueprint:TemplateArtifact ownerAssignment /{resourceScope}/providers/Microsoft.Blueprint/blueprints/{blueprintName}/artifacts/{artifactName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0