1. Packages
  2. Azure Classic
  3. API Docs
  4. core
  5. TenantTemplateDeployment

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.core.TenantTemplateDeployment

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.core.getTemplateSpecVersion({
    name: "myTemplateForTenant",
    resourceGroupName: "myResourceGroup",
    version: "v0.1",
});
const exampleTenantTemplateDeployment = new azure.core.TenantTemplateDeployment("example", {
    name: "example",
    location: "West Europe",
    templateSpecVersionId: example.then(example => example.id),
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.get_template_spec_version(name="myTemplateForTenant",
    resource_group_name="myResourceGroup",
    version="v0.1")
example_tenant_template_deployment = azure.core.TenantTemplateDeployment("example",
    name="example",
    location="West Europe",
    template_spec_version_id=example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{
			Name:              "myTemplateForTenant",
			ResourceGroupName: "myResourceGroup",
			Version:           "v0.1",
		}, nil)
		if err != nil {
			return err
		}
		_, err = core.NewTenantTemplateDeployment(ctx, "example", &core.TenantTemplateDeploymentArgs{
			Name:                  pulumi.String("example"),
			Location:              pulumi.String("West Europe"),
			TemplateSpecVersionId: pulumi.String(example.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Core.GetTemplateSpecVersion.Invoke(new()
    {
        Name = "myTemplateForTenant",
        ResourceGroupName = "myResourceGroup",
        Version = "v0.1",
    });

    var exampleTenantTemplateDeployment = new Azure.Core.TenantTemplateDeployment("example", new()
    {
        Name = "example",
        Location = "West Europe",
        TemplateSpecVersionId = example.Apply(getTemplateSpecVersionResult => getTemplateSpecVersionResult.Id),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetTemplateSpecVersionArgs;
import com.pulumi.azure.core.TenantTemplateDeployment;
import com.pulumi.azure.core.TenantTemplateDeploymentArgs;
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) {
        final var example = CoreFunctions.getTemplateSpecVersion(GetTemplateSpecVersionArgs.builder()
            .name("myTemplateForTenant")
            .resourceGroupName("myResourceGroup")
            .version("v0.1")
            .build());

        var exampleTenantTemplateDeployment = new TenantTemplateDeployment("exampleTenantTemplateDeployment", TenantTemplateDeploymentArgs.builder()
            .name("example")
            .location("West Europe")
            .templateSpecVersionId(example.applyValue(getTemplateSpecVersionResult -> getTemplateSpecVersionResult.id()))
            .build());

    }
}
Copy
resources:
  exampleTenantTemplateDeployment:
    type: azure:core:TenantTemplateDeployment
    name: example
    properties:
      name: example
      location: West Europe
      templateSpecVersionId: ${example.id}
variables:
  example:
    fn::invoke:
      function: azure:core:getTemplateSpecVersion
      arguments:
        name: myTemplateForTenant
        resourceGroupName: myResourceGroup
        version: v0.1
Copy

Create TenantTemplateDeployment Resource

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

Constructor syntax

new TenantTemplateDeployment(name: string, args?: TenantTemplateDeploymentArgs, opts?: CustomResourceOptions);
@overload
def TenantTemplateDeployment(resource_name: str,
                             args: Optional[TenantTemplateDeploymentArgs] = None,
                             opts: Optional[ResourceOptions] = None)

@overload
def TenantTemplateDeployment(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             debug_level: Optional[str] = None,
                             location: Optional[str] = None,
                             name: Optional[str] = None,
                             parameters_content: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             template_content: Optional[str] = None,
                             template_spec_version_id: Optional[str] = None)
func NewTenantTemplateDeployment(ctx *Context, name string, args *TenantTemplateDeploymentArgs, opts ...ResourceOption) (*TenantTemplateDeployment, error)
public TenantTemplateDeployment(string name, TenantTemplateDeploymentArgs? args = null, CustomResourceOptions? opts = null)
public TenantTemplateDeployment(String name, TenantTemplateDeploymentArgs args)
public TenantTemplateDeployment(String name, TenantTemplateDeploymentArgs args, CustomResourceOptions options)
type: azure:core:TenantTemplateDeployment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args TenantTemplateDeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args TenantTemplateDeploymentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args TenantTemplateDeploymentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args TenantTemplateDeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TenantTemplateDeploymentArgs
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 tenantTemplateDeploymentResource = new Azure.Core.TenantTemplateDeployment("tenantTemplateDeploymentResource", new()
{
    DebugLevel = "string",
    Location = "string",
    Name = "string",
    ParametersContent = "string",
    Tags = 
    {
        { "string", "string" },
    },
    TemplateContent = "string",
    TemplateSpecVersionId = "string",
});
Copy
example, err := core.NewTenantTemplateDeployment(ctx, "tenantTemplateDeploymentResource", &core.TenantTemplateDeploymentArgs{
	DebugLevel:        pulumi.String("string"),
	Location:          pulumi.String("string"),
	Name:              pulumi.String("string"),
	ParametersContent: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TemplateContent:       pulumi.String("string"),
	TemplateSpecVersionId: pulumi.String("string"),
})
Copy
var tenantTemplateDeploymentResource = new TenantTemplateDeployment("tenantTemplateDeploymentResource", TenantTemplateDeploymentArgs.builder()
    .debugLevel("string")
    .location("string")
    .name("string")
    .parametersContent("string")
    .tags(Map.of("string", "string"))
    .templateContent("string")
    .templateSpecVersionId("string")
    .build());
Copy
tenant_template_deployment_resource = azure.core.TenantTemplateDeployment("tenantTemplateDeploymentResource",
    debug_level="string",
    location="string",
    name="string",
    parameters_content="string",
    tags={
        "string": "string",
    },
    template_content="string",
    template_spec_version_id="string")
Copy
const tenantTemplateDeploymentResource = new azure.core.TenantTemplateDeployment("tenantTemplateDeploymentResource", {
    debugLevel: "string",
    location: "string",
    name: "string",
    parametersContent: "string",
    tags: {
        string: "string",
    },
    templateContent: "string",
    templateSpecVersionId: "string",
});
Copy
type: azure:core:TenantTemplateDeployment
properties:
    debugLevel: string
    location: string
    name: string
    parametersContent: string
    tags:
        string: string
    templateContent: string
    templateSpecVersionId: string
Copy

TenantTemplateDeployment 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 TenantTemplateDeployment resource accepts the following input properties:

DebugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
Location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
ParametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
Tags Dictionary<string, string>
A mapping of tags which should be assigned to the Template.
TemplateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
TemplateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
DebugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
Location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
ParametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
Tags map[string]string
A mapping of tags which should be assigned to the Template.
TemplateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
TemplateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel String
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. String
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template. Changing this forces a new Template to be created.
parametersContent String
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Map<String,String>
A mapping of tags which should be assigned to the Template.
templateContent String
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId String
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
parametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags {[key: string]: string}
A mapping of tags which should be assigned to the Template.
templateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debug_level str
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. str
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Template. Changing this forces a new Template to be created.
parameters_content str
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Mapping[str, str]
A mapping of tags which should be assigned to the Template.
template_content str
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
template_spec_version_id str
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel String
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. String
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template. Changing this forces a new Template to be created.
parametersContent String
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Map<String>
A mapping of tags which should be assigned to the Template.
templateContent String
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId String
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
OutputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
Id string
The provider-assigned unique ID for this managed resource.
OutputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
id String
The provider-assigned unique ID for this managed resource.
outputContent String
The JSON Content of the Outputs of the ARM Template Deployment.
id string
The provider-assigned unique ID for this managed resource.
outputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
id str
The provider-assigned unique ID for this managed resource.
output_content str
The JSON Content of the Outputs of the ARM Template Deployment.
id String
The provider-assigned unique ID for this managed resource.
outputContent String
The JSON Content of the Outputs of the ARM Template Deployment.

Look up Existing TenantTemplateDeployment Resource

Get an existing TenantTemplateDeployment 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?: TenantTemplateDeploymentState, opts?: CustomResourceOptions): TenantTemplateDeployment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        debug_level: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        output_content: Optional[str] = None,
        parameters_content: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        template_content: Optional[str] = None,
        template_spec_version_id: Optional[str] = None) -> TenantTemplateDeployment
func GetTenantTemplateDeployment(ctx *Context, name string, id IDInput, state *TenantTemplateDeploymentState, opts ...ResourceOption) (*TenantTemplateDeployment, error)
public static TenantTemplateDeployment Get(string name, Input<string> id, TenantTemplateDeploymentState? state, CustomResourceOptions? opts = null)
public static TenantTemplateDeployment get(String name, Output<String> id, TenantTemplateDeploymentState state, CustomResourceOptions options)
resources:  _:    type: azure:core:TenantTemplateDeployment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DebugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
Location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
OutputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
ParametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
Tags Dictionary<string, string>
A mapping of tags which should be assigned to the Template.
TemplateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
TemplateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
DebugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
Location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
OutputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
ParametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
Tags map[string]string
A mapping of tags which should be assigned to the Template.
TemplateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
TemplateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel String
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. String
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template. Changing this forces a new Template to be created.
outputContent String
The JSON Content of the Outputs of the ARM Template Deployment.
parametersContent String
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Map<String,String>
A mapping of tags which should be assigned to the Template.
templateContent String
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId String
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel string
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. string
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Template. Changing this forces a new Template to be created.
outputContent string
The JSON Content of the Outputs of the ARM Template Deployment.
parametersContent string
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags {[key: string]: string}
A mapping of tags which should be assigned to the Template.
templateContent string
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId string
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debug_level str
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. str
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Template. Changing this forces a new Template to be created.
output_content str
The JSON Content of the Outputs of the ARM Template Deployment.
parameters_content str
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Mapping[str, str]
A mapping of tags which should be assigned to the Template.
template_content str
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
template_spec_version_id str
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.
debugLevel String
The Debug Level which should be used for this Resource Group Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.
location Changes to this property will trigger replacement. String
The Azure Region where the Template should exist. Changing this forces a new Template to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template. Changing this forces a new Template to be created.
outputContent String
The JSON Content of the Outputs of the ARM Template Deployment.
parametersContent String
The contents of the ARM Template parameters file - containing a JSON list of parameters.
tags Map<String>
A mapping of tags which should be assigned to the Template.
templateContent String
The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with template_spec_version_id.
templateSpecVersionId String
The ID of the Template Spec Version to deploy. Cannot be specified with template_content.

Import

Tenant Template Deployments can be imported using the resource id, e.g.

$ pulumi import azure:core/tenantTemplateDeployment:TenantTemplateDeployment example /providers/Microsoft.Resources/deployments/deploy1
Copy

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.