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 Subscription 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.getSubscriptionTemplateDeployment({
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_subscription_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.LookupSubscriptionTemplateDeployment(ctx, &core.LookupSubscriptionTemplateDeploymentArgs{
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.GetSubscriptionTemplateDeployment.Invoke(new()
{
Name = "existing",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getSubscriptionTemplateDeploymentResult => getSubscriptionTemplateDeploymentResult.Id),
["exampleOutput"] = Std.Jsondecode.Invoke(new()
{
Input = example.Apply(getSubscriptionTemplateDeploymentResult => getSubscriptionTemplateDeploymentResult.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.GetSubscriptionTemplateDeploymentArgs;
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.getSubscriptionTemplateDeployment(GetSubscriptionTemplateDeploymentArgs.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:getSubscriptionTemplateDeployment
arguments:
name: existing
outputs:
id: ${example.id}
exampleOutput:
fn::invoke:
function: std:jsondecode
arguments:
input: ${example.outputContent}
return: result.exampleOutput.value
Using getSubscriptionTemplateDeployment
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 getSubscriptionTemplateDeployment(args: GetSubscriptionTemplateDeploymentArgs, opts?: InvokeOptions): Promise<GetSubscriptionTemplateDeploymentResult>
function getSubscriptionTemplateDeploymentOutput(args: GetSubscriptionTemplateDeploymentOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionTemplateDeploymentResult>def get_subscription_template_deployment(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionTemplateDeploymentResult
def get_subscription_template_deployment_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionTemplateDeploymentResult]func LookupSubscriptionTemplateDeployment(ctx *Context, args *LookupSubscriptionTemplateDeploymentArgs, opts ...InvokeOption) (*LookupSubscriptionTemplateDeploymentResult, error)
func LookupSubscriptionTemplateDeploymentOutput(ctx *Context, args *LookupSubscriptionTemplateDeploymentOutputArgs, opts ...InvokeOption) LookupSubscriptionTemplateDeploymentResultOutput> Note: This function is named LookupSubscriptionTemplateDeployment in the Go SDK.
public static class GetSubscriptionTemplateDeployment
{
public static Task<GetSubscriptionTemplateDeploymentResult> InvokeAsync(GetSubscriptionTemplateDeploymentArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionTemplateDeploymentResult> Invoke(GetSubscriptionTemplateDeploymentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscriptionTemplateDeploymentResult> getSubscriptionTemplateDeployment(GetSubscriptionTemplateDeploymentArgs args, InvokeOptions options)
public static Output<GetSubscriptionTemplateDeploymentResult> getSubscriptionTemplateDeployment(GetSubscriptionTemplateDeploymentArgs args, InvokeOptions options)
fn::invoke:
function: azure:core/getSubscriptionTemplateDeployment:getSubscriptionTemplateDeployment
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of this Subscription Template Deployment.
- Name string
- The name of this Subscription Template Deployment.
- name String
- The name of this Subscription Template Deployment.
- name string
- The name of this Subscription Template Deployment.
- name str
- The name of this Subscription Template Deployment.
- name String
- The name of this Subscription Template Deployment.
getSubscriptionTemplateDeployment Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Output
Content 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
- Output
Content 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
- output
Content 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
- output
Content 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
- output
Content 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
azurermTerraform Provider.
