1. Packages
  2. Azure Classic
  3. API Docs
  4. management
  5. GroupTemplateDeployment

We recommend using Azure Native.

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

azure.management.GroupTemplateDeployment

Explore with Pulumi AI

Manages a Template Deployment at a Management Group Scope.

Note: Deleting a Deployment at the Management Group Scope will not delete any resources created by the deployment.

Note: Deployments to a Management Group are always Incrementally applied. Existing resources that are not part of the template will not be removed.

Example Usage

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

const example = azure.management.getGroup({
    name: "00000000-0000-0000-0000-000000000000",
});
const exampleGroupTemplateDeployment = new azure.management.GroupTemplateDeployment("example", {
    name: "example",
    location: "West Europe",
    managementGroupId: example.then(example => example.id),
    templateContent: `{
  "schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyAssignmentName": {
      "type": "string",
      "defaultValue": "[guid(parameters('policyDefinitionID'), resourceGroup().name)]",
      "metadata": {
        "description": "Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides."
      }
    },
    "policyDefinitionID": {
      "type": "string",
      "metadata": {
        "description": "Specifies the ID of the policy definition or policy set definition being assigned."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Authorization/policyAssignments",
      "name": "[parameters('policyAssignmentName')]",
      "apiVersion": "2019-09-01",
      "properties": {
        "scope": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]",
        "policyDefinitionId": "[parameters('policyDefinitionID')]"
      }
    }
  ]
}
`,
    parametersContent: `{
  "schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyDefinitionID": {
      "value": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a"
    }
  }
}
`,
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
    name="example",
    location="West Europe",
    management_group_id=example.id,
    template_content="""{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyAssignmentName": {
      "type": "string",
      "defaultValue": "[guid(parameters('policyDefinitionID'), resourceGroup().name)]",
      "metadata": {
        "description": "Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides."
      }
    },
    "policyDefinitionID": {
      "type": "string",
      "metadata": {
        "description": "Specifies the ID of the policy definition or policy set definition being assigned."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Authorization/policyAssignments",
      "name": "[parameters('policyAssignmentName')]",
      "apiVersion": "2019-09-01",
      "properties": {
        "scope": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]",
        "policyDefinitionId": "[parameters('policyDefinitionID')]"
      }
    }
  ]
}
""",
    parameters_content="""{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyDefinitionID": {
      "value": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a"
    }
  }
}
""")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
			Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
			Name:              pulumi.String("example"),
			Location:          pulumi.String("West Europe"),
			ManagementGroupId: pulumi.String(example.Id),
			TemplateContent: pulumi.String(`{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyAssignmentName": {
      "type": "string",
      "defaultValue": "[guid(parameters('policyDefinitionID'), resourceGroup().name)]",
      "metadata": {
        "description": "Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides."
      }
    },
    "policyDefinitionID": {
      "type": "string",
      "metadata": {
        "description": "Specifies the ID of the policy definition or policy set definition being assigned."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Authorization/policyAssignments",
      "name": "[parameters('policyAssignmentName')]",
      "apiVersion": "2019-09-01",
      "properties": {
        "scope": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]",
        "policyDefinitionId": "[parameters('policyDefinitionID')]"
      }
    }
  ]
}
`),
			ParametersContent: pulumi.String(`{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyDefinitionID": {
      "value": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a"
    }
  }
}
`),
		})
		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.Management.GetGroup.Invoke(new()
    {
        Name = "00000000-0000-0000-0000-000000000000",
    });

    var exampleGroupTemplateDeployment = new Azure.Management.GroupTemplateDeployment("example", new()
    {
        Name = "example",
        Location = "West Europe",
        ManagementGroupId = example.Apply(getGroupResult => getGroupResult.Id),
        TemplateContent = @"{
  ""$schema"": ""https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#"",
  ""contentVersion"": ""1.0.0.0"",
  ""parameters"": {
    ""policyAssignmentName"": {
      ""type"": ""string"",
      ""defaultValue"": ""[guid(parameters('policyDefinitionID'), resourceGroup().name)]"",
      ""metadata"": {
        ""description"": ""Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.""
      }
    },
    ""policyDefinitionID"": {
      ""type"": ""string"",
      ""metadata"": {
        ""description"": ""Specifies the ID of the policy definition or policy set definition being assigned.""
      }
    }
  },
  ""resources"": [
    {
      ""type"": ""Microsoft.Authorization/policyAssignments"",
      ""name"": ""[parameters('policyAssignmentName')]"",
      ""apiVersion"": ""2019-09-01"",
      ""properties"": {
        ""scope"": ""[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]"",
        ""policyDefinitionId"": ""[parameters('policyDefinitionID')]""
      }
    }
  ]
}
",
        ParametersContent = @"{
  ""$schema"": ""https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#"",
  ""contentVersion"": ""1.0.0.0"",
  ""parameters"": {
    ""policyDefinitionID"": {
      ""value"": ""/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a""
    }
  }
}
",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.management.ManagementFunctions;
import com.pulumi.azure.management.inputs.GetGroupArgs;
import com.pulumi.azure.management.GroupTemplateDeployment;
import com.pulumi.azure.management.GroupTemplateDeploymentArgs;
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 = ManagementFunctions.getGroup(GetGroupArgs.builder()
            .name("00000000-0000-0000-0000-000000000000")
            .build());

        var exampleGroupTemplateDeployment = new GroupTemplateDeployment("exampleGroupTemplateDeployment", GroupTemplateDeploymentArgs.builder()
            .name("example")
            .location("West Europe")
            .managementGroupId(example.applyValue(getGroupResult -> getGroupResult.id()))
            .templateContent("""
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyAssignmentName": {
      "type": "string",
      "defaultValue": "[guid(parameters('policyDefinitionID'), resourceGroup().name)]",
      "metadata": {
        "description": "Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides."
      }
    },
    "policyDefinitionID": {
      "type": "string",
      "metadata": {
        "description": "Specifies the ID of the policy definition or policy set definition being assigned."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Authorization/policyAssignments",
      "name": "[parameters('policyAssignmentName')]",
      "apiVersion": "2019-09-01",
      "properties": {
        "scope": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]",
        "policyDefinitionId": "[parameters('policyDefinitionID')]"
      }
    }
  ]
}
            """)
            .parametersContent("""
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "policyDefinitionID": {
      "value": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a"
    }
  }
}
            """)
            .build());

    }
}
Copy
resources:
  exampleGroupTemplateDeployment:
    type: azure:management:GroupTemplateDeployment
    name: example
    properties:
      name: example
      location: West Europe
      managementGroupId: ${example.id}
      templateContent: |
        {
          "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
          "contentVersion": "1.0.0.0",
          "parameters": {
            "policyAssignmentName": {
              "type": "string",
              "defaultValue": "[guid(parameters('policyDefinitionID'), resourceGroup().name)]",
              "metadata": {
                "description": "Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides."
              }
            },
            "policyDefinitionID": {
              "type": "string",
              "metadata": {
                "description": "Specifies the ID of the policy definition or policy set definition being assigned."
              }
            }
          },
          "resources": [
            {
              "type": "Microsoft.Authorization/policyAssignments",
              "name": "[parameters('policyAssignmentName')]",
              "apiVersion": "2019-09-01",
              "properties": {
                "scope": "[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]",
                "policyDefinitionId": "[parameters('policyDefinitionID')]"
              }
            }
          ]
        }        
      parametersContent: |
        {
          "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
          "contentVersion": "1.0.0.0",
          "parameters": {
            "policyDefinitionID": {
              "value": "/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a"
            }
          }
        }        
variables:
  example:
    fn::invoke:
      function: azure:management:getGroup
      arguments:
        name: 00000000-0000-0000-0000-000000000000
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as std from "@pulumi/std";

const example = azure.management.getGroup({
    name: "00000000-0000-0000-0000-000000000000",
});
const exampleGroupTemplateDeployment = new azure.management.GroupTemplateDeployment("example", {
    name: "example",
    location: "West Europe",
    managementGroupId: example.then(example => example.id),
    templateContent: std.file({
        input: "templates/example-deploy-template.json",
    }).then(invoke => invoke.result),
    parametersContent: std.file({
        input: "templates/example-deploy-params.json",
    }).then(invoke => invoke.result),
});
Copy
import pulumi
import pulumi_azure as azure
import pulumi_std as std

example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
    name="example",
    location="West Europe",
    management_group_id=example.id,
    template_content=std.file(input="templates/example-deploy-template.json").result,
    parameters_content=std.file(input="templates/example-deploy-params.json").result)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
			Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		if err != nil {
			return err
		}
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "templates/example-deploy-template.json",
		}, nil)
		if err != nil {
			return err
		}
		invokeFile1, err := std.File(ctx, &std.FileArgs{
			Input: "templates/example-deploy-params.json",
		}, nil)
		if err != nil {
			return err
		}
		_, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
			Name:              pulumi.String("example"),
			Location:          pulumi.String("West Europe"),
			ManagementGroupId: pulumi.String(example.Id),
			TemplateContent:   pulumi.String(invokeFile.Result),
			ParametersContent: pulumi.String(invokeFile1.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Management.GetGroup.Invoke(new()
    {
        Name = "00000000-0000-0000-0000-000000000000",
    });

    var exampleGroupTemplateDeployment = new Azure.Management.GroupTemplateDeployment("example", new()
    {
        Name = "example",
        Location = "West Europe",
        ManagementGroupId = example.Apply(getGroupResult => getGroupResult.Id),
        TemplateContent = Std.File.Invoke(new()
        {
            Input = "templates/example-deploy-template.json",
        }).Apply(invoke => invoke.Result),
        ParametersContent = Std.File.Invoke(new()
        {
            Input = "templates/example-deploy-params.json",
        }).Apply(invoke => invoke.Result),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.management.ManagementFunctions;
import com.pulumi.azure.management.inputs.GetGroupArgs;
import com.pulumi.azure.management.GroupTemplateDeployment;
import com.pulumi.azure.management.GroupTemplateDeploymentArgs;
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 = ManagementFunctions.getGroup(GetGroupArgs.builder()
            .name("00000000-0000-0000-0000-000000000000")
            .build());

        var exampleGroupTemplateDeployment = new GroupTemplateDeployment("exampleGroupTemplateDeployment", GroupTemplateDeploymentArgs.builder()
            .name("example")
            .location("West Europe")
            .managementGroupId(example.applyValue(getGroupResult -> getGroupResult.id()))
            .templateContent(StdFunctions.file(FileArgs.builder()
                .input("templates/example-deploy-template.json")
                .build()).result())
            .parametersContent(StdFunctions.file(FileArgs.builder()
                .input("templates/example-deploy-params.json")
                .build()).result())
            .build());

    }
}
Copy
resources:
  exampleGroupTemplateDeployment:
    type: azure:management:GroupTemplateDeployment
    name: example
    properties:
      name: example
      location: West Europe
      managementGroupId: ${example.id}
      templateContent:
        fn::invoke:
          function: std:file
          arguments:
            input: templates/example-deploy-template.json
          return: result
      parametersContent:
        fn::invoke:
          function: std:file
          arguments:
            input: templates/example-deploy-params.json
          return: result
variables:
  example:
    fn::invoke:
      function: azure:management:getGroup
      arguments:
        name: 00000000-0000-0000-0000-000000000000
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.management.getGroup({
    name: "00000000-0000-0000-0000-000000000000",
});
const exampleGetTemplateSpecVersion = azure.core.getTemplateSpecVersion({
    name: "exampleTemplateForManagementGroup",
    resourceGroupName: "exampleResourceGroup",
    version: "v1.0.9",
});
const exampleGroupTemplateDeployment = new azure.management.GroupTemplateDeployment("example", {
    name: "example",
    location: "West Europe",
    managementGroupId: example.then(example => example.id),
    templateSpecVersionId: exampleGetTemplateSpecVersion.then(exampleGetTemplateSpecVersion => exampleGetTemplateSpecVersion.id),
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
example_get_template_spec_version = azure.core.get_template_spec_version(name="exampleTemplateForManagementGroup",
    resource_group_name="exampleResourceGroup",
    version="v1.0.9")
example_group_template_deployment = azure.management.GroupTemplateDeployment("example",
    name="example",
    location="West Europe",
    management_group_id=example.id,
    template_spec_version_id=example_get_template_spec_version.id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
			Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		if err != nil {
			return err
		}
		exampleGetTemplateSpecVersion, err := core.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{
			Name:              "exampleTemplateForManagementGroup",
			ResourceGroupName: "exampleResourceGroup",
			Version:           "v1.0.9",
		}, nil)
		if err != nil {
			return err
		}
		_, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
			Name:                  pulumi.String("example"),
			Location:              pulumi.String("West Europe"),
			ManagementGroupId:     pulumi.String(example.Id),
			TemplateSpecVersionId: pulumi.String(exampleGetTemplateSpecVersion.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.Management.GetGroup.Invoke(new()
    {
        Name = "00000000-0000-0000-0000-000000000000",
    });

    var exampleGetTemplateSpecVersion = Azure.Core.GetTemplateSpecVersion.Invoke(new()
    {
        Name = "exampleTemplateForManagementGroup",
        ResourceGroupName = "exampleResourceGroup",
        Version = "v1.0.9",
    });

    var exampleGroupTemplateDeployment = new Azure.Management.GroupTemplateDeployment("example", new()
    {
        Name = "example",
        Location = "West Europe",
        ManagementGroupId = example.Apply(getGroupResult => getGroupResult.Id),
        TemplateSpecVersionId = exampleGetTemplateSpecVersion.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.management.ManagementFunctions;
import com.pulumi.azure.management.inputs.GetGroupArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetTemplateSpecVersionArgs;
import com.pulumi.azure.management.GroupTemplateDeployment;
import com.pulumi.azure.management.GroupTemplateDeploymentArgs;
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 = ManagementFunctions.getGroup(GetGroupArgs.builder()
            .name("00000000-0000-0000-0000-000000000000")
            .build());

        final var exampleGetTemplateSpecVersion = CoreFunctions.getTemplateSpecVersion(GetTemplateSpecVersionArgs.builder()
            .name("exampleTemplateForManagementGroup")
            .resourceGroupName("exampleResourceGroup")
            .version("v1.0.9")
            .build());

        var exampleGroupTemplateDeployment = new GroupTemplateDeployment("exampleGroupTemplateDeployment", GroupTemplateDeploymentArgs.builder()
            .name("example")
            .location("West Europe")
            .managementGroupId(example.applyValue(getGroupResult -> getGroupResult.id()))
            .templateSpecVersionId(exampleGetTemplateSpecVersion.applyValue(getTemplateSpecVersionResult -> getTemplateSpecVersionResult.id()))
            .build());

    }
}
Copy
resources:
  exampleGroupTemplateDeployment:
    type: azure:management:GroupTemplateDeployment
    name: example
    properties:
      name: example
      location: West Europe
      managementGroupId: ${example.id}
      templateSpecVersionId: ${exampleGetTemplateSpecVersion.id}
variables:
  example:
    fn::invoke:
      function: azure:management:getGroup
      arguments:
        name: 00000000-0000-0000-0000-000000000000
  exampleGetTemplateSpecVersion:
    fn::invoke:
      function: azure:core:getTemplateSpecVersion
      arguments:
        name: exampleTemplateForManagementGroup
        resourceGroupName: exampleResourceGroup
        version: v1.0.9
Copy

Create GroupTemplateDeployment Resource

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

Constructor syntax

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

@overload
def GroupTemplateDeployment(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            management_group_id: Optional[str] = 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 NewGroupTemplateDeployment(ctx *Context, name string, args GroupTemplateDeploymentArgs, opts ...ResourceOption) (*GroupTemplateDeployment, error)
public GroupTemplateDeployment(string name, GroupTemplateDeploymentArgs args, CustomResourceOptions? opts = null)
public GroupTemplateDeployment(String name, GroupTemplateDeploymentArgs args)
public GroupTemplateDeployment(String name, GroupTemplateDeploymentArgs args, CustomResourceOptions options)
type: azure:management:GroupTemplateDeployment
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 This property is required. GroupTemplateDeploymentArgs
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 This property is required. GroupTemplateDeploymentArgs
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 This property is required. GroupTemplateDeploymentArgs
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 This property is required. GroupTemplateDeploymentArgs
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. GroupTemplateDeploymentArgs
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 groupTemplateDeploymentResource = new Azure.Management.GroupTemplateDeployment("groupTemplateDeploymentResource", new()
{
    ManagementGroupId = "string",
    DebugLevel = "string",
    Location = "string",
    Name = "string",
    ParametersContent = "string",
    Tags = 
    {
        { "string", "string" },
    },
    TemplateContent = "string",
    TemplateSpecVersionId = "string",
});
Copy
example, err := management.NewGroupTemplateDeployment(ctx, "groupTemplateDeploymentResource", &management.GroupTemplateDeploymentArgs{
	ManagementGroupId: pulumi.String("string"),
	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 groupTemplateDeploymentResource = new GroupTemplateDeployment("groupTemplateDeploymentResource", GroupTemplateDeploymentArgs.builder()
    .managementGroupId("string")
    .debugLevel("string")
    .location("string")
    .name("string")
    .parametersContent("string")
    .tags(Map.of("string", "string"))
    .templateContent("string")
    .templateSpecVersionId("string")
    .build());
Copy
group_template_deployment_resource = azure.management.GroupTemplateDeployment("groupTemplateDeploymentResource",
    management_group_id="string",
    debug_level="string",
    location="string",
    name="string",
    parameters_content="string",
    tags={
        "string": "string",
    },
    template_content="string",
    template_spec_version_id="string")
Copy
const groupTemplateDeploymentResource = new azure.management.GroupTemplateDeployment("groupTemplateDeploymentResource", {
    managementGroupId: "string",
    debugLevel: "string",
    location: "string",
    name: "string",
    parametersContent: "string",
    tags: {
        string: "string",
    },
    templateContent: "string",
    templateSpecVersionId: "string",
});
Copy
type: azure:management:GroupTemplateDeployment
properties:
    debugLevel: string
    location: string
    managementGroupId: string
    name: string
    parametersContent: string
    tags:
        string: string
    templateContent: string
    templateSpecVersionId: string
Copy

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

ManagementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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.
ManagementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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.
managementGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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.
managementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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.
management_group_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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.
managementGroupId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
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 Deployment. Changing this forces a new 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 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 GroupTemplateDeployment 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 GroupTemplateDeployment Resource

Get an existing GroupTemplateDeployment 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?: GroupTemplateDeploymentState, opts?: CustomResourceOptions): GroupTemplateDeployment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        debug_level: Optional[str] = None,
        location: Optional[str] = None,
        management_group_id: 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) -> GroupTemplateDeployment
func GetGroupTemplateDeployment(ctx *Context, name string, id IDInput, state *GroupTemplateDeploymentState, opts ...ResourceOption) (*GroupTemplateDeployment, error)
public static GroupTemplateDeployment Get(string name, Input<string> id, GroupTemplateDeploymentState? state, CustomResourceOptions? opts = null)
public static GroupTemplateDeployment get(String name, Output<String> id, GroupTemplateDeploymentState state, CustomResourceOptions options)
resources:  _:    type: azure:management:GroupTemplateDeployment    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.
ManagementGroupId Changes to this property will trigger replacement. string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template Deployment. Changing this forces a new 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 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.
ManagementGroupId Changes to this property will trigger replacement. string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Template Deployment. Changing this forces a new 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 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.
managementGroupId Changes to this property will trigger replacement. String
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template Deployment. Changing this forces a new 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 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.
managementGroupId Changes to this property will trigger replacement. string
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Template Deployment. Changing this forces a new 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 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.
management_group_id Changes to this property will trigger replacement. str
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Template Deployment. Changing this forces a new 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 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.
managementGroupId Changes to this property will trigger replacement. String
The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Template Deployment. Changing this forces a new 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 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

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

$ pulumi import azure:management/groupTemplateDeployment:GroupTemplateDeployment example /providers/Microsoft.Management/managementGroups/my-management-group-id/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.