All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.management.kotlin.GroupTemplateDeploymentArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.management.kotlin

import com.pulumi.azure.management.GroupTemplateDeploymentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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
 * 
 * ```typescript
 * 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"
 *     }
 *   }
 * }
 * `,
 * });
 * ```
 * ```python
 * 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"
 *     }
 *   }
 * }
 * """)
 * ```
 * ```csharp
 * 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""
 *     }
 *   }
 * }
 * ",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * ```
 * 
 * 
 * ```typescript
 * 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),
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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:   invokeFile.Result,
 * 			ParametersContent: invokeFile1.Result,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * ```
 * 
 * 
 * ```typescript
 * 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),
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * ```
 * 
 * ## Import
 * Management Group Template Deployments can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:management/groupTemplateDeployment:GroupTemplateDeployment example /providers/Microsoft.Management/managementGroups/my-management-group-id/providers/Microsoft.Resources/deployments/deploy1
 * ```
 * @property debugLevel The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
 * @property location The Azure Region where the Template should exist. Changing this forces a new Template to be created.
 * @property managementGroupId The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
 * @property name The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
 * @property parametersContent The contents of the ARM Template parameters file - containing a JSON list of parameters.
 * @property tags A mapping of tags which should be assigned to the Template.
 * @property templateContent The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
 * @property templateSpecVersionId The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
 */
public data class GroupTemplateDeploymentArgs(
    public val debugLevel: Output? = null,
    public val location: Output? = null,
    public val managementGroupId: Output? = null,
    public val name: Output? = null,
    public val parametersContent: Output? = null,
    public val tags: Output>? = null,
    public val templateContent: Output? = null,
    public val templateSpecVersionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.management.GroupTemplateDeploymentArgs =
        com.pulumi.azure.management.GroupTemplateDeploymentArgs.builder()
            .debugLevel(debugLevel?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .managementGroupId(managementGroupId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parametersContent(parametersContent?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .templateContent(templateContent?.applyValue({ args0 -> args0 }))
            .templateSpecVersionId(templateSpecVersionId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GroupTemplateDeploymentArgs].
 */
@PulumiTagMarker
public class GroupTemplateDeploymentArgsBuilder internal constructor() {
    private var debugLevel: Output? = null

    private var location: Output? = null

    private var managementGroupId: Output? = null

    private var name: Output? = null

    private var parametersContent: Output? = null

    private var tags: Output>? = null

    private var templateContent: Output? = null

    private var templateSpecVersionId: Output? = null

    /**
     * @param value The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
     */
    @JvmName("yygevntpvwemjuek")
    public suspend fun debugLevel(`value`: Output) {
        this.debugLevel = value
    }

    /**
     * @param value The Azure Region where the Template should exist. Changing this forces a new Template to be created.
     */
    @JvmName("dkoxxdyuuulgexxj")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
     */
    @JvmName("dxfcabjpqyxvawiy")
    public suspend fun managementGroupId(`value`: Output) {
        this.managementGroupId = value
    }

    /**
     * @param value The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
     */
    @JvmName("bsspeithradhpsqs")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The contents of the ARM Template parameters file - containing a JSON list of parameters.
     */
    @JvmName("rppuuiewjuwtpeno")
    public suspend fun parametersContent(`value`: Output) {
        this.parametersContent = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Template.
     */
    @JvmName("mfpclhcntfqgkdcx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
     */
    @JvmName("talyildcuhiochgi")
    public suspend fun templateContent(`value`: Output) {
        this.templateContent = value
    }

    /**
     * @param value The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
     */
    @JvmName("tyeppoieiyhcagwc")
    public suspend fun templateSpecVersionId(`value`: Output) {
        this.templateSpecVersionId = value
    }

    /**
     * @param value The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
     */
    @JvmName("vidndncjsivfxpcj")
    public suspend fun debugLevel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.debugLevel = mapped
    }

    /**
     * @param value The Azure Region where the Template should exist. Changing this forces a new Template to be created.
     */
    @JvmName("dsugqwuuiisifdbg")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
     */
    @JvmName("erccpmbfuccralxt")
    public suspend fun managementGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managementGroupId = mapped
    }

    /**
     * @param value The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
     */
    @JvmName("pifxkubutwjjcdds")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The contents of the ARM Template parameters file - containing a JSON list of parameters.
     */
    @JvmName("vddykdxcnvcgkopv")
    public suspend fun parametersContent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parametersContent = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Template.
     */
    @JvmName("hocpomkeqbbyggff")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Template.
     */
    @JvmName("tpgklbxujekukwvh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `template_spec_version_id`.
     */
    @JvmName("ftmvacuvekjfkkdl")
    public suspend fun templateContent(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateContent = mapped
    }

    /**
     * @param value The ID of the Template Spec Version to deploy. Cannot be specified with `template_content`.
     */
    @JvmName("vwsbrnfwdlckqyuf")
    public suspend fun templateSpecVersionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateSpecVersionId = mapped
    }

    internal fun build(): GroupTemplateDeploymentArgs = GroupTemplateDeploymentArgs(
        debugLevel = debugLevel,
        location = location,
        managementGroupId = managementGroupId,
        name = name,
        parametersContent = parametersContent,
        tags = tags,
        templateContent = templateContent,
        templateSpecVersionId = templateSpecVersionId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy