Azure Classic

v5.24.0 published on Wednesday, Nov 9, 2022 by Pulumi

SubscriptionTemplateDeployment

Manages a Subscription Template Deployment.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.SubscriptionTemplateDeployment("example", new()
    {
        Location = "West Europe",
        TemplateContent = @" {
   ""$schema"": ""https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"",
   ""contentVersion"": ""1.0.0.0"",
   ""parameters"": {},
   ""variables"": {},
   ""resources"": [
     {
       ""type"": ""Microsoft.Resources/resourceGroups"",
       ""apiVersion"": ""2018-05-01"",
       ""location"": ""West Europe"",
       ""name"": ""some-resource-group"",
       ""properties"": {}
     }
   ]
 }
 
",
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.NewSubscriptionTemplateDeployment(ctx, "example", &core.SubscriptionTemplateDeploymentArgs{
			Location: pulumi.String("West Europe"),
			TemplateContent: pulumi.String(fmt.Sprintf(` {
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {},
   "variables": {},
   "resources": [
     {
       "type": "Microsoft.Resources/resourceGroups",
       "apiVersion": "2018-05-01",
       "location": "West Europe",
       "name": "some-resource-group",
       "properties": {}
     }
   ]
 }
 
`)),
		})
		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.azure.core.SubscriptionTemplateDeployment;
import com.pulumi.azure.core.SubscriptionTemplateDeploymentArgs;
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 example = new SubscriptionTemplateDeployment("example", SubscriptionTemplateDeploymentArgs.builder()        
            .location("West Europe")
            .templateContent("""
 {
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {},
   "variables": {},
   "resources": [
     {
       "type": "Microsoft.Resources/resourceGroups",
       "apiVersion": "2018-05-01",
       "location": "West Europe",
       "name": "some-resource-group",
       "properties": {}
     }
   ]
 }
 
            """)
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.core.SubscriptionTemplateDeployment("example",
    location="West Europe",
    template_content=""" {
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {},
   "variables": {},
   "resources": [
     {
       "type": "Microsoft.Resources/resourceGroups",
       "apiVersion": "2018-05-01",
       "location": "West Europe",
       "name": "some-resource-group",
       "properties": {}
     }
   ]
 }
 
""")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.SubscriptionTemplateDeployment("example", {
    location: "West Europe",
    templateContent: ` {
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {},
   "variables": {},
   "resources": [
     {
       "type": "Microsoft.Resources/resourceGroups",
       "apiVersion": "2018-05-01",
       "location": "West Europe",
       "name": "some-resource-group",
       "properties": {}
     }
   ]
 }
 `,
});
resources:
  example:
    type: azure:core:SubscriptionTemplateDeployment
    properties:
      location: West Europe
      templateContent: " {\n   \"$schema\": \"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n   \"contentVersion\": \"1.0.0.0\",\n   \"parameters\": {},\n   \"variables\": {},\n   \"resources\": [\n     {\n       \"type\": \"Microsoft.Resources/resourceGroups\",\n       \"apiVersion\": \"2018-05-01\",\n       \"location\": \"West Europe\",\n       \"name\": \"some-resource-group\",\n       \"properties\": {}\n     }\n   ]\n }\n \n"

Create SubscriptionTemplateDeployment Resource

new SubscriptionTemplateDeployment(name: string, args?: SubscriptionTemplateDeploymentArgs, opts?: CustomResourceOptions);
@overload
def SubscriptionTemplateDeployment(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)
@overload
def SubscriptionTemplateDeployment(resource_name: str,
                                   args: Optional[SubscriptionTemplateDeploymentArgs] = None,
                                   opts: Optional[ResourceOptions] = None)
func NewSubscriptionTemplateDeployment(ctx *Context, name string, args *SubscriptionTemplateDeploymentArgs, opts ...ResourceOption) (*SubscriptionTemplateDeployment, error)
public SubscriptionTemplateDeployment(string name, SubscriptionTemplateDeploymentArgs? args = null, CustomResourceOptions? opts = null)
public SubscriptionTemplateDeployment(String name, SubscriptionTemplateDeploymentArgs args)
public SubscriptionTemplateDeployment(String name, SubscriptionTemplateDeploymentArgs args, CustomResourceOptions options)
type: azure:core:SubscriptionTemplateDeployment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SubscriptionTemplateDeploymentArgs
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 SubscriptionTemplateDeploymentArgs
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 SubscriptionTemplateDeploymentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SubscriptionTemplateDeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SubscriptionTemplateDeploymentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SubscriptionTemplateDeployment Resource Properties

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

Inputs

The SubscriptionTemplateDeployment resource accepts the following input properties:

DebugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

Location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

Name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

TemplateContent string

The contents of the ARM Template which should be deployed into this Subscription.

TemplateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

DebugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

Location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

Name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

TemplateContent string

The contents of the ARM Template which should be deployed into this Subscription.

TemplateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel String

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location String

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name String

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent String

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId String

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent string

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debug_level str

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location str

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name str

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

template_content str

The contents of the ARM Template which should be deployed into this Subscription.

template_spec_version_id str

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel String

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location String

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name String

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent String

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId String

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

Outputs

All input properties are implicitly available as output properties. Additionally, the SubscriptionTemplateDeployment 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 SubscriptionTemplateDeployment Resource

Get an existing SubscriptionTemplateDeployment 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?: SubscriptionTemplateDeploymentState, opts?: CustomResourceOptions): SubscriptionTemplateDeployment
@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) -> SubscriptionTemplateDeployment
func GetSubscriptionTemplateDeployment(ctx *Context, name string, id IDInput, state *SubscriptionTemplateDeploymentState, opts ...ResourceOption) (*SubscriptionTemplateDeployment, error)
public static SubscriptionTemplateDeployment Get(string name, Input<string> id, SubscriptionTemplateDeploymentState? state, CustomResourceOptions? opts = null)
public static SubscriptionTemplateDeployment get(String name, Output<String> id, SubscriptionTemplateDeploymentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DebugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

Location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

Name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

TemplateContent string

The contents of the ARM Template which should be deployed into this Subscription.

TemplateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

DebugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

Location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

Name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

TemplateContent string

The contents of the ARM Template which should be deployed into this Subscription.

TemplateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel String

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location String

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name String

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent String

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId String

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel string

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location string

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name string

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent string

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId string

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debug_level str

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location str

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name str

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

template_content str

The contents of the ARM Template which should be deployed into this Subscription.

template_spec_version_id str

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

debugLevel String

The Debug Level which should be used for this Subscription Template Deployment. Possible values are none, requestContent, responseContent and requestContent, responseContent.

location String

The Azure Region where the Subscription Template Deployment should exist. Changing this forces a new Subscription Template Deployment to be created.

name String

The name which should be used for this Subscription Template Deployment. Changing this forces a new Subscription Template Deployment 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 Subscription Template Deployment.

templateContent String

The contents of the ARM Template which should be deployed into this Subscription.

templateSpecVersionId String

The ID of the Template Spec Version to deploy into the Subscription. Cannot be specified with template_content.

Import

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

 $ pulumi import azure:core/subscriptionTemplateDeployment:SubscriptionTemplateDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Resources/deployments/template1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.