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

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.core.TemplateDeployment

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a template deployment of resources

    Note on ARM Template Deployments: Due to the way the underlying Azure API is designed, this provider can only manage the deployment of the ARM Template - and not any resources which are created by it. This means that when deleting the azure.core.TemplateDeployment resource, this provider will only remove the reference to the deployment, whilst leaving any resources created by that ARM Template Deployment. One workaround for this is to use a unique Resource Group for each ARM Template Deployment, which means deleting the Resource Group would contain any resources created within it - however this isn’t ideal. More information.

    Example Usage

    Note: This example uses Storage Accounts and Public IP’s which are natively supported by this provider - we’d highly recommend using the Native Resources where possible instead rather than an ARM Template, for the reasons outlined above.

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleTemplateDeployment = new azure.core.TemplateDeployment("example", {
        name: "acctesttemplate-01",
        resourceGroupName: example.name,
        templateBody: `{
      "schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "location": "[resourceGroup().location]",
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'storage')]",
        "publicIPAddressName": "[concat('myPublicIp', uniquestring(resourceGroup().id))]",
        "publicIPAddressType": "Dynamic",
        "apiVersion": "2015-06-15",
        "dnsLabelPrefix": "example-acctest"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "[variables('apiVersion')]",
          "location": "[variables('location')]",
          "properties": {
            "accountType": "[parameters('storageAccountType')]"
          }
        },
        {
          "type": "Microsoft.Network/publicIPAddresses",
          "apiVersion": "[variables('apiVersion')]",
          "name": "[variables('publicIPAddressName')]",
          "location": "[variables('location')]",
          "properties": {
            "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
            "dnsSettings": {
              "domainNameLabel": "[variables('dnsLabelPrefix')]"
            }
          }
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    }
    `,
        parameters: {
            storageAccountType: "Standard_GRS",
        },
        deploymentMode: "Incremental",
    });
    export const storageAccountName = exampleTemplateDeployment.outputs.storageAccountName;
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_template_deployment = azure.core.TemplateDeployment("example",
        name="acctesttemplate-01",
        resource_group_name=example.name,
        template_body="""{
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "location": "[resourceGroup().location]",
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'storage')]",
        "publicIPAddressName": "[concat('myPublicIp', uniquestring(resourceGroup().id))]",
        "publicIPAddressType": "Dynamic",
        "apiVersion": "2015-06-15",
        "dnsLabelPrefix": "example-acctest"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "[variables('apiVersion')]",
          "location": "[variables('location')]",
          "properties": {
            "accountType": "[parameters('storageAccountType')]"
          }
        },
        {
          "type": "Microsoft.Network/publicIPAddresses",
          "apiVersion": "[variables('apiVersion')]",
          "name": "[variables('publicIPAddressName')]",
          "location": "[variables('location')]",
          "properties": {
            "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
            "dnsSettings": {
              "domainNameLabel": "[variables('dnsLabelPrefix')]"
            }
          }
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    }
    """,
        parameters={
            "storageAccountType": "Standard_GRS",
        },
        deployment_mode="Incremental")
    pulumi.export("storageAccountName", example_template_deployment.outputs["storageAccountName"])
    
    package main
    
    import (
    	"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 {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTemplateDeployment, err := core.NewTemplateDeployment(ctx, "example", &core.TemplateDeploymentArgs{
    			Name:              pulumi.String("acctesttemplate-01"),
    			ResourceGroupName: example.Name,
    			TemplateBody: pulumi.String(`{
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "location": "[resourceGroup().location]",
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'storage')]",
        "publicIPAddressName": "[concat('myPublicIp', uniquestring(resourceGroup().id))]",
        "publicIPAddressType": "Dynamic",
        "apiVersion": "2015-06-15",
        "dnsLabelPrefix": "example-acctest"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "[variables('apiVersion')]",
          "location": "[variables('location')]",
          "properties": {
            "accountType": "[parameters('storageAccountType')]"
          }
        },
        {
          "type": "Microsoft.Network/publicIPAddresses",
          "apiVersion": "[variables('apiVersion')]",
          "name": "[variables('publicIPAddressName')]",
          "location": "[variables('location')]",
          "properties": {
            "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
            "dnsSettings": {
              "domainNameLabel": "[variables('dnsLabelPrefix')]"
            }
          }
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    }
    `),
    			Parameters: pulumi.StringMap{
    				"storageAccountType": pulumi.String("Standard_GRS"),
    			},
    			DeploymentMode: pulumi.String("Incremental"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("storageAccountName", exampleTemplateDeployment.Outputs.ApplyT(func(outputs map[string]string) (string, error) {
    			return outputs.StorageAccountName, nil
    		}).(pulumi.StringOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleTemplateDeployment = new Azure.Core.TemplateDeployment("example", new()
        {
            Name = "acctesttemplate-01",
            ResourceGroupName = example.Name,
            TemplateBody = @"{
      ""$schema"": ""https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"",
      ""contentVersion"": ""1.0.0.0"",
      ""parameters"": {
        ""storageAccountType"": {
          ""type"": ""string"",
          ""defaultValue"": ""Standard_LRS"",
          ""allowedValues"": [
            ""Standard_LRS"",
            ""Standard_GRS"",
            ""Standard_ZRS""
          ],
          ""metadata"": {
            ""description"": ""Storage Account type""
          }
        }
      },
      ""variables"": {
        ""location"": ""[resourceGroup().location]"",
        ""storageAccountName"": ""[concat(uniquestring(resourceGroup().id), 'storage')]"",
        ""publicIPAddressName"": ""[concat('myPublicIp', uniquestring(resourceGroup().id))]"",
        ""publicIPAddressType"": ""Dynamic"",
        ""apiVersion"": ""2015-06-15"",
        ""dnsLabelPrefix"": ""example-acctest""
      },
      ""resources"": [
        {
          ""type"": ""Microsoft.Storage/storageAccounts"",
          ""name"": ""[variables('storageAccountName')]"",
          ""apiVersion"": ""[variables('apiVersion')]"",
          ""location"": ""[variables('location')]"",
          ""properties"": {
            ""accountType"": ""[parameters('storageAccountType')]""
          }
        },
        {
          ""type"": ""Microsoft.Network/publicIPAddresses"",
          ""apiVersion"": ""[variables('apiVersion')]"",
          ""name"": ""[variables('publicIPAddressName')]"",
          ""location"": ""[variables('location')]"",
          ""properties"": {
            ""publicIPAllocationMethod"": ""[variables('publicIPAddressType')]"",
            ""dnsSettings"": {
              ""domainNameLabel"": ""[variables('dnsLabelPrefix')]""
            }
          }
        }
      ],
      ""outputs"": {
        ""storageAccountName"": {
          ""type"": ""string"",
          ""value"": ""[variables('storageAccountName')]""
        }
      }
    }
    ",
            Parameters = 
            {
                { "storageAccountType", "Standard_GRS" },
            },
            DeploymentMode = "Incremental",
        });
    
        return new Dictionary<string, object?>
        {
            ["storageAccountName"] = exampleTemplateDeployment.Outputs.Apply(outputs => outputs.StorageAccountName),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.core.TemplateDeployment;
    import com.pulumi.azure.core.TemplateDeploymentArgs;
    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 ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleTemplateDeployment = new TemplateDeployment("exampleTemplateDeployment", TemplateDeploymentArgs.builder()
                .name("acctesttemplate-01")
                .resourceGroupName(example.name())
                .templateBody("""
    {
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "storageAccountType": {
          "type": "string",
          "defaultValue": "Standard_LRS",
          "allowedValues": [
            "Standard_LRS",
            "Standard_GRS",
            "Standard_ZRS"
          ],
          "metadata": {
            "description": "Storage Account type"
          }
        }
      },
      "variables": {
        "location": "[resourceGroup().location]",
        "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'storage')]",
        "publicIPAddressName": "[concat('myPublicIp', uniquestring(resourceGroup().id))]",
        "publicIPAddressType": "Dynamic",
        "apiVersion": "2015-06-15",
        "dnsLabelPrefix": "example-acctest"
      },
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[variables('storageAccountName')]",
          "apiVersion": "[variables('apiVersion')]",
          "location": "[variables('location')]",
          "properties": {
            "accountType": "[parameters('storageAccountType')]"
          }
        },
        {
          "type": "Microsoft.Network/publicIPAddresses",
          "apiVersion": "[variables('apiVersion')]",
          "name": "[variables('publicIPAddressName')]",
          "location": "[variables('location')]",
          "properties": {
            "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
            "dnsSettings": {
              "domainNameLabel": "[variables('dnsLabelPrefix')]"
            }
          }
        }
      ],
      "outputs": {
        "storageAccountName": {
          "type": "string",
          "value": "[variables('storageAccountName')]"
        }
      }
    }
                """)
                .parameters(Map.of("storageAccountType", "Standard_GRS"))
                .deploymentMode("Incremental")
                .build());
    
            ctx.export("storageAccountName", exampleTemplateDeployment.outputs().applyValue(outputs -> outputs.storageAccountName()));
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleTemplateDeployment:
        type: azure:core:TemplateDeployment
        name: example
        properties:
          name: acctesttemplate-01
          resourceGroupName: ${example.name}
          templateBody: |
            {
              "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
              "contentVersion": "1.0.0.0",
              "parameters": {
                "storageAccountType": {
                  "type": "string",
                  "defaultValue": "Standard_LRS",
                  "allowedValues": [
                    "Standard_LRS",
                    "Standard_GRS",
                    "Standard_ZRS"
                  ],
                  "metadata": {
                    "description": "Storage Account type"
                  }
                }
              },
              "variables": {
                "location": "[resourceGroup().location]",
                "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'storage')]",
                "publicIPAddressName": "[concat('myPublicIp', uniquestring(resourceGroup().id))]",
                "publicIPAddressType": "Dynamic",
                "apiVersion": "2015-06-15",
                "dnsLabelPrefix": "example-acctest"
              },
              "resources": [
                {
                  "type": "Microsoft.Storage/storageAccounts",
                  "name": "[variables('storageAccountName')]",
                  "apiVersion": "[variables('apiVersion')]",
                  "location": "[variables('location')]",
                  "properties": {
                    "accountType": "[parameters('storageAccountType')]"
                  }
                },
                {
                  "type": "Microsoft.Network/publicIPAddresses",
                  "apiVersion": "[variables('apiVersion')]",
                  "name": "[variables('publicIPAddressName')]",
                  "location": "[variables('location')]",
                  "properties": {
                    "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
                    "dnsSettings": {
                      "domainNameLabel": "[variables('dnsLabelPrefix')]"
                    }
                  }
                }
              ],
              "outputs": {
                "storageAccountName": {
                  "type": "string",
                  "value": "[variables('storageAccountName')]"
                }
              }
            }        
          parameters:
            storageAccountType: Standard_GRS
          deploymentMode: Incremental
    outputs:
      storageAccountName: ${exampleTemplateDeployment.outputs.storageAccountName}
    

    Note

    This provider does not know about the individual resources created by Azure using a deployment template and therefore cannot delete these resources during a destroy. Destroying a template deployment removes the associated deployment operations, but will not delete the Azure resources created by the deployment. In order to delete these resources, the containing resource group must also be destroyed. More information.

    Create TemplateDeployment Resource

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

    Constructor syntax

    new TemplateDeployment(name: string, args: TemplateDeploymentArgs, opts?: CustomResourceOptions);
    @overload
    def TemplateDeployment(resource_name: str,
                           args: TemplateDeploymentArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def TemplateDeployment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           deployment_mode: Optional[str] = None,
                           resource_group_name: Optional[str] = None,
                           name: Optional[str] = None,
                           parameters: Optional[Mapping[str, str]] = None,
                           parameters_body: Optional[str] = None,
                           template_body: Optional[str] = None)
    func NewTemplateDeployment(ctx *Context, name string, args TemplateDeploymentArgs, opts ...ResourceOption) (*TemplateDeployment, error)
    public TemplateDeployment(string name, TemplateDeploymentArgs args, CustomResourceOptions? opts = null)
    public TemplateDeployment(String name, TemplateDeploymentArgs args)
    public TemplateDeployment(String name, TemplateDeploymentArgs args, CustomResourceOptions options)
    
    type: azure:core:TemplateDeployment
    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 TemplateDeploymentArgs
    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 TemplateDeploymentArgs
    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 TemplateDeploymentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TemplateDeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TemplateDeploymentArgs
    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 templateDeploymentResource = new Azure.Core.TemplateDeployment("templateDeploymentResource", new()
    {
        DeploymentMode = "string",
        ResourceGroupName = "string",
        Name = "string",
        Parameters = 
        {
            { "string", "string" },
        },
        ParametersBody = "string",
        TemplateBody = "string",
    });
    
    example, err := core.NewTemplateDeployment(ctx, "templateDeploymentResource", &core.TemplateDeploymentArgs{
    	DeploymentMode:    pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Parameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ParametersBody: pulumi.String("string"),
    	TemplateBody:   pulumi.String("string"),
    })
    
    var templateDeploymentResource = new TemplateDeployment("templateDeploymentResource", TemplateDeploymentArgs.builder()
        .deploymentMode("string")
        .resourceGroupName("string")
        .name("string")
        .parameters(Map.of("string", "string"))
        .parametersBody("string")
        .templateBody("string")
        .build());
    
    template_deployment_resource = azure.core.TemplateDeployment("templateDeploymentResource",
        deployment_mode="string",
        resource_group_name="string",
        name="string",
        parameters={
            "string": "string",
        },
        parameters_body="string",
        template_body="string")
    
    const templateDeploymentResource = new azure.core.TemplateDeployment("templateDeploymentResource", {
        deploymentMode: "string",
        resourceGroupName: "string",
        name: "string",
        parameters: {
            string: "string",
        },
        parametersBody: "string",
        templateBody: "string",
    });
    
    type: azure:core:TemplateDeployment
    properties:
        deploymentMode: string
        name: string
        parameters:
            string: string
        parametersBody: string
        resourceGroupName: string
        templateBody: string
    

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

    DeploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    ResourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    Parameters Dictionary<string, string>
    Specifies the name and value pairs that define the deployment parameters for the template.
    ParametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    TemplateBody string
    Specifies the JSON definition for the template.
    DeploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    ResourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    Parameters map[string]string
    Specifies the name and value pairs that define the deployment parameters for the template.
    ParametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    TemplateBody string
    Specifies the JSON definition for the template.
    deploymentMode String
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    resourceGroupName String
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    name String
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    parameters Map<String,String>
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody String
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    templateBody String
    Specifies the JSON definition for the template.
    deploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    resourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    parameters {[key: string]: string}
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    templateBody string
    Specifies the JSON definition for the template.
    deployment_mode str
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    resource_group_name str
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    name str
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    parameters Mapping[str, str]
    Specifies the name and value pairs that define the deployment parameters for the template.
    parameters_body str
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    template_body str
    Specifies the JSON definition for the template.
    deploymentMode String
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    resourceGroupName String
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    name String
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    parameters Map<String>
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody String
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    templateBody String
    Specifies the JSON definition for the template.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Outputs Dictionary<string, string>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    Id string
    The provider-assigned unique ID for this managed resource.
    Outputs map[string]string
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    id String
    The provider-assigned unique ID for this managed resource.
    outputs Map<String,String>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    id string
    The provider-assigned unique ID for this managed resource.
    outputs {[key: string]: string}
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    id str
    The provider-assigned unique ID for this managed resource.
    outputs Mapping[str, str]
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    id String
    The provider-assigned unique ID for this managed resource.
    outputs Map<String>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].

    Look up Existing TemplateDeployment Resource

    Get an existing TemplateDeployment 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?: TemplateDeploymentState, opts?: CustomResourceOptions): TemplateDeployment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            deployment_mode: Optional[str] = None,
            name: Optional[str] = None,
            outputs: Optional[Mapping[str, str]] = None,
            parameters: Optional[Mapping[str, str]] = None,
            parameters_body: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            template_body: Optional[str] = None) -> TemplateDeployment
    func GetTemplateDeployment(ctx *Context, name string, id IDInput, state *TemplateDeploymentState, opts ...ResourceOption) (*TemplateDeployment, error)
    public static TemplateDeployment Get(string name, Input<string> id, TemplateDeploymentState? state, CustomResourceOptions? opts = null)
    public static TemplateDeployment get(String name, Output<String> id, TemplateDeploymentState 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:
    DeploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    Name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    Outputs Dictionary<string, string>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    Parameters Dictionary<string, string>
    Specifies the name and value pairs that define the deployment parameters for the template.
    ParametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    ResourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    TemplateBody string
    Specifies the JSON definition for the template.
    DeploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    Name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    Outputs map[string]string
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    Parameters map[string]string
    Specifies the name and value pairs that define the deployment parameters for the template.
    ParametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    ResourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    TemplateBody string
    Specifies the JSON definition for the template.
    deploymentMode String
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    name String
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    outputs Map<String,String>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    parameters Map<String,String>
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody String
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    resourceGroupName String
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    templateBody String
    Specifies the JSON definition for the template.
    deploymentMode string
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    name string
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    outputs {[key: string]: string}
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    parameters {[key: string]: string}
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody string
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    resourceGroupName string
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    templateBody string
    Specifies the JSON definition for the template.
    deployment_mode str
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    name str
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    outputs Mapping[str, str]
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    parameters Mapping[str, str]
    Specifies the name and value pairs that define the deployment parameters for the template.
    parameters_body str
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    resource_group_name str
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    template_body str
    Specifies the JSON definition for the template.
    deploymentMode String
    Specifies the mode that is used to deploy resources. This value could be either Incremental or Complete. Note that you will almost always want this to be set to Incremental otherwise the deployment will destroy all infrastructure not specified within the template, and this provider will not be aware of this.
    name String
    Specifies the name of the template deployment. Changing this forces a new resource to be created.
    outputs Map<String>
    A map of supported scalar output types returned from the deployment (currently, Azure Template Deployment outputs of type String, Int and Bool are supported, and are converted to strings - others will be ignored) and can be accessed using .outputs["name"].
    parameters Map<String>
    Specifies the name and value pairs that define the deployment parameters for the template.
    parametersBody String
    Specifies a valid Azure JSON parameters file that define the deployment parameters. It can contain KeyVault references
    resourceGroupName String
    The name of the resource group in which to create the template deployment. Changing this forces a new resource to be created.
    templateBody String
    Specifies the JSON definition for the template.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi