Azure Template Resource Group Template Deployment

This page shows how to write Terraform and Azure Resource Manager for Template Resource Group Template Deployment and write them securely.

azurerm_resource_group_template_deployment (Terraform)

The Resource Group Template Deployment in Template can be configured in Terraform with the resource name azurerm_resource_group_template_deployment. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

acre-arm.tf#L1
resource "azurerm_resource_group_template_deployment" "acre" {
  name                = var.acre_name
  resource_group_name = var.acre_resource_group
  deployment_mode     = var.acre_deployment_mode
  template_content    = templatefile(var.acre_template_path, { acre_name = var.acre_name, location = var.location } )
main.tf#L1
resource "azurerm_resource_group_template_deployment" "template" {
  for_each            = var.templates
  name                = each.value.name
  resource_group_name = var.resource_group_name
  deployment_mode     = each.value.deployment_mode
  template_content    = each.value.template_content
main.tf#L15
resource "azurerm_resource_group_template_deployment" "siteextension" {
  name                = "siteextension-deploy"
  resource_group_name = var.resource_group_name
  deployment_mode     = "Incremental"

  depends_on = [
main.tf#L29
resource "azurerm_resource_group_template_deployment" "my_logic_app" {
    name = "DSGlogicapp"
    resource_group_name = azurerm_resource_group.RG-for-logicapp.name
    template_content = templatefile("/home/runner/work/demo_logic_app/demo_logic_app/template.json", {})
    parameters_content = templatefile("/home/runner/work/demo_logic_app/demo_logic_app/parameters.json", {})
    deployment_mode = "Incremental"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Resource Group Template Deployment.

Note: This resource will automatically attempt to delete resources deployed by the ARM Template when it is deleted. This behavior can be disabled in the provider features block by setting the delete_nested_items_during_deletion field to false within the template_deployment block.

Microsoft.Resources/deployments (Azure Resource Manager)

The deployments in Microsoft.Resources can be configured in Azure Resource Manager with the resource name Microsoft.Resources/deployments. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

template.json#L6
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2018-02-01",
            "name": "pid-0b87316f-9d3a-427e-88cf-399fc4100b33",
            "properties": {
                "mode": "Incremental",
                "template": {
azuredeploy.json#L20
            "type": "Microsoft.Resources/deployments",
            "properties": {
            "mode": "Incremental",
            "templateLink": {
                "uri": "https://raw.githubusercontent.com/lnesdevops/sql16w16build/master/azuredeploy.json",
                "contentVersion": "1.0.0.0"
master.template.json#L53
            "type": "Microsoft.Resources/deployments",
            "properties": {
              "mode": "Incremental",
              "templateLink": {
                 "uri":"[concat(parameters('repoBaseUrl'), '/service.template.json')]",
                 "contentVersion":"1.0.0.0"
master.json#L17
      "type": "Microsoft.Resources/deployments",
      "properties": {
        "mode": "incremental",
        "templateLink": {
          "uri": "https://javaonazure.blob.core.windows.net/deployment/container-registry.json",
          "contentVersion": "1.0.0.0"
simple-nsg-scale-nested.json#L26
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2016-09-01",
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[parameters('_artifactsLocation')]",
FullEnvironmentSetup.json#L93
            "type": "Microsoft.Resources/deployments",
            "apiVersion": "2014-04-01-preview",
            "properties": {
                "mode": "Incremental",
                "templateLink": {
                    "uri": "[concat(parameters('sharedTemplateUrl'), '/', variables('sqlServerAndDbTemplateFile'))]",

Frequently asked questions

What is Azure Template Resource Group Template Deployment?

Azure Template Resource Group Template Deployment is a resource for Template of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Template Resource Group Template Deployment?

For Terraform, the dashaun/acre-terraform-example, BartoszDopke/terraform-azurerm_resource_group_template_deployment and shibayan/terraform-azurerm-appservice-proxy source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the asafc64/AzureTicket, lnesdevops/vfRegression and Azure/azure-api-management-devops-resource-kit source code examples are useful. See the Azure Resource Manager Example section for further details.