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

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
azure logo

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi

    Use this data source to access information about an existing Tenant Template Deployment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = azure.core.getTenantTemplateDeployment({
        name: "existing",
    });
    export const id = example.then(example => example.id);
    export const exampleOutput = example.then(example => std.jsondecode({
        input: example.outputContent,
    })).then(invoke => invoke.result?.exampleOutput?.value);
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.get_tenant_template_deployment(name="existing")
    pulumi.export("id", example.id)
    pulumi.export("exampleOutput", std.jsondecode(input=example.output_content).result["exampleOutput"]["value"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"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 := core.LookupTenantTemplateDeployment(ctx, &core.LookupTenantTemplateDeploymentArgs{
    			Name: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		ctx.Export("exampleOutput", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{
    			Input: example.OutputContent,
    		}, nil).Result.ExampleOutput.Value))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Core.GetTenantTemplateDeployment.Invoke(new()
        {
            Name = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getTenantTemplateDeploymentResult => getTenantTemplateDeploymentResult.Id),
            ["exampleOutput"] = Std.Jsondecode.Invoke(new()
            {
                Input = example.Apply(getTenantTemplateDeploymentResult => getTenantTemplateDeploymentResult.OutputContent),
            }).Apply(invoke => invoke.Result?.ExampleOutput?.Value),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.inputs.GetTenantTemplateDeploymentArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.JsondecodeArgs;
    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 = CoreFunctions.getTenantTemplateDeployment(GetTenantTemplateDeploymentArgs.builder()
                .name("existing")
                .build());
    
            ctx.export("id", example.id());
            ctx.export("exampleOutput", StdFunctions.jsondecode(JsondecodeArgs.builder()
                .input(example.outputContent())
                .build()).result().exampleOutput().value());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:core:getTenantTemplateDeployment
          arguments:
            name: existing
    outputs:
      id: ${example.id}
      exampleOutput:
        fn::invoke:
          function: std:jsondecode
          arguments:
            input: ${example.outputContent}
          return: result.exampleOutput.value
    

    Using getTenantTemplateDeployment

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTenantTemplateDeployment(args: GetTenantTemplateDeploymentArgs, opts?: InvokeOptions): Promise<GetTenantTemplateDeploymentResult>
    function getTenantTemplateDeploymentOutput(args: GetTenantTemplateDeploymentOutputArgs, opts?: InvokeOptions): Output<GetTenantTemplateDeploymentResult>
    def get_tenant_template_deployment(name: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetTenantTemplateDeploymentResult
    def get_tenant_template_deployment_output(name: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetTenantTemplateDeploymentResult]
    func LookupTenantTemplateDeployment(ctx *Context, args *LookupTenantTemplateDeploymentArgs, opts ...InvokeOption) (*LookupTenantTemplateDeploymentResult, error)
    func LookupTenantTemplateDeploymentOutput(ctx *Context, args *LookupTenantTemplateDeploymentOutputArgs, opts ...InvokeOption) LookupTenantTemplateDeploymentResultOutput

    > Note: This function is named LookupTenantTemplateDeployment in the Go SDK.

    public static class GetTenantTemplateDeployment 
    {
        public static Task<GetTenantTemplateDeploymentResult> InvokeAsync(GetTenantTemplateDeploymentArgs args, InvokeOptions? opts = null)
        public static Output<GetTenantTemplateDeploymentResult> Invoke(GetTenantTemplateDeploymentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTenantTemplateDeploymentResult> getTenantTemplateDeployment(GetTenantTemplateDeploymentArgs args, InvokeOptions options)
    public static Output<GetTenantTemplateDeploymentResult> getTenantTemplateDeployment(GetTenantTemplateDeploymentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:core/getTenantTemplateDeployment:getTenantTemplateDeployment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this Tenant Template Deployment.
    Name string
    The name of this Tenant Template Deployment.
    name String
    The name of this Tenant Template Deployment.
    name string
    The name of this Tenant Template Deployment.
    name str
    The name of this Tenant Template Deployment.
    name String
    The name of this Tenant Template Deployment.

    getTenantTemplateDeployment Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OutputContent string
    The JSON Content of the Outputs of the ARM Template Deployment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OutputContent string
    The JSON Content of the Outputs of the ARM Template Deployment.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    outputContent String
    The JSON Content of the Outputs of the ARM Template Deployment.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    outputContent string
    The JSON Content of the Outputs of the ARM Template Deployment.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    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.
    name String
    outputContent String
    The JSON Content of the Outputs of the ARM Template Deployment.

    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 v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate