1. Packages
  2. Spectrocloud Provider
  3. API Docs
  4. getClusterConfigTemplate
spectrocloud 0.26.0 published on Saturday, Nov 22, 2025 by spectrocloud
spectrocloud logo
spectrocloud 0.26.0 published on Saturday, Nov 22, 2025 by spectrocloud

    Data source for retrieving information about a cluster config template. Tech Preview: This data source is in tech preview and may undergo changes.

    Example Usage

    Project-Level Template

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const template = spectrocloud.getClusterConfigTemplate({
        name: templateName,
        context: "project",
    });
    export const templateCloudType = template.then(template => template.cloudType);
    export const templateTags = template.then(template => template.tags);
    export const templateDescription = template.then(template => template.description);
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    template = spectrocloud.get_cluster_config_template(name=template_name,
        context="project")
    pulumi.export("templateCloudType", template.cloud_type)
    pulumi.export("templateTags", template.tags)
    pulumi.export("templateDescription", template.description)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		template, err := spectrocloud.LookupClusterConfigTemplate(ctx, &spectrocloud.LookupClusterConfigTemplateArgs{
    			Name:    templateName,
    			Context: pulumi.StringRef("project"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("templateCloudType", template.CloudType)
    		ctx.Export("templateTags", template.Tags)
    		ctx.Export("templateDescription", template.Description)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var template = Spectrocloud.GetClusterConfigTemplate.Invoke(new()
        {
            Name = templateName,
            Context = "project",
        });
    
        return new Dictionary<string, object?>
        {
            ["templateCloudType"] = template.Apply(getClusterConfigTemplateResult => getClusterConfigTemplateResult.CloudType),
            ["templateTags"] = template.Apply(getClusterConfigTemplateResult => getClusterConfigTemplateResult.Tags),
            ["templateDescription"] = template.Apply(getClusterConfigTemplateResult => getClusterConfigTemplateResult.Description),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.spectrocloud.SpectrocloudFunctions;
    import com.pulumi.spectrocloud.inputs.GetClusterConfigTemplateArgs;
    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 template = SpectrocloudFunctions.getClusterConfigTemplate(GetClusterConfigTemplateArgs.builder()
                .name(templateName)
                .context("project")
                .build());
    
            ctx.export("templateCloudType", template.cloudType());
            ctx.export("templateTags", template.tags());
            ctx.export("templateDescription", template.description());
        }
    }
    
    variables:
      template:
        fn::invoke:
          function: spectrocloud:getClusterConfigTemplate
          arguments:
            name: ${templateName}
            context: project
    outputs:
      templateCloudType: ${template.cloudType}
      templateTags: ${template.tags}
      templateDescription: ${template.description}
    

    Tenant-Level Template

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const tenantTemplate = spectrocloud.getClusterConfigTemplate({
        name: "organization-wide-template",
        context: "tenant",
    });
    export const tenantTemplateClusterProfile = tenantTemplate.then(tenantTemplate => tenantTemplate.clusterProfiles);
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    tenant_template = spectrocloud.get_cluster_config_template(name="organization-wide-template",
        context="tenant")
    pulumi.export("tenantTemplateClusterProfile", tenant_template.cluster_profiles)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tenantTemplate, err := spectrocloud.LookupClusterConfigTemplate(ctx, &spectrocloud.LookupClusterConfigTemplateArgs{
    			Name:    "organization-wide-template",
    			Context: pulumi.StringRef("tenant"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("tenantTemplateClusterProfile", tenantTemplate.ClusterProfiles)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var tenantTemplate = Spectrocloud.GetClusterConfigTemplate.Invoke(new()
        {
            Name = "organization-wide-template",
            Context = "tenant",
        });
    
        return new Dictionary<string, object?>
        {
            ["tenantTemplateClusterProfile"] = tenantTemplate.Apply(getClusterConfigTemplateResult => getClusterConfigTemplateResult.ClusterProfiles),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.spectrocloud.SpectrocloudFunctions;
    import com.pulumi.spectrocloud.inputs.GetClusterConfigTemplateArgs;
    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 tenantTemplate = SpectrocloudFunctions.getClusterConfigTemplate(GetClusterConfigTemplateArgs.builder()
                .name("organization-wide-template")
                .context("tenant")
                .build());
    
            ctx.export("tenantTemplateClusterProfile", tenantTemplate.clusterProfiles());
        }
    }
    
    variables:
      tenantTemplate:
        fn::invoke:
          function: spectrocloud:getClusterConfigTemplate
          arguments:
            name: organization-wide-template
            context: tenant
    outputs:
      tenantTemplateClusterProfile: ${tenantTemplate.clusterProfiles}
    

    Using getClusterConfigTemplate

    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 getClusterConfigTemplate(args: GetClusterConfigTemplateArgs, opts?: InvokeOptions): Promise<GetClusterConfigTemplateResult>
    function getClusterConfigTemplateOutput(args: GetClusterConfigTemplateOutputArgs, opts?: InvokeOptions): Output<GetClusterConfigTemplateResult>
    def get_cluster_config_template(context: Optional[str] = None,
                                    id: Optional[str] = None,
                                    name: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetClusterConfigTemplateResult
    def get_cluster_config_template_output(context: Optional[pulumi.Input[str]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    name: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterConfigTemplateResult]
    func LookupClusterConfigTemplate(ctx *Context, args *LookupClusterConfigTemplateArgs, opts ...InvokeOption) (*LookupClusterConfigTemplateResult, error)
    func LookupClusterConfigTemplateOutput(ctx *Context, args *LookupClusterConfigTemplateOutputArgs, opts ...InvokeOption) LookupClusterConfigTemplateResultOutput

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

    public static class GetClusterConfigTemplate 
    {
        public static Task<GetClusterConfigTemplateResult> InvokeAsync(GetClusterConfigTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterConfigTemplateResult> Invoke(GetClusterConfigTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterConfigTemplateResult> getClusterConfigTemplate(GetClusterConfigTemplateArgs args, InvokeOptions options)
    public static Output<GetClusterConfigTemplateResult> getClusterConfigTemplate(GetClusterConfigTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getClusterConfigTemplate:getClusterConfigTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the cluster config template.
    Context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The ID of this resource.
    Name string
    The name of the cluster config template.
    Context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The ID of this resource.
    name String
    The name of the cluster config template.
    context String
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.
    name string
    The name of the cluster config template.
    context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id string
    The ID of this resource.
    name str
    The name of the cluster config template.
    context str
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id str
    The ID of this resource.
    name String
    The name of the cluster config template.
    context String
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.

    getClusterConfigTemplate Result

    The following output properties are available:

    AttachedClusters List<GetClusterConfigTemplateAttachedCluster>
    List of clusters attached to this template.
    CloudType string
    The cloud type for the cluster template.
    ClusterProfiles List<GetClusterConfigTemplateClusterProfile>
    Set of cluster profile references.
    Description string
    The description of the cluster config template.
    ExecutionState string
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    Id string
    The ID of this resource.
    Name string
    The name of the cluster config template.
    Policies List<GetClusterConfigTemplatePolicy>
    List of policy references.
    Tags List<string>
    Tags assigned to the cluster config template.
    Context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    AttachedClusters []GetClusterConfigTemplateAttachedCluster
    List of clusters attached to this template.
    CloudType string
    The cloud type for the cluster template.
    ClusterProfiles []GetClusterConfigTemplateClusterProfile
    Set of cluster profile references.
    Description string
    The description of the cluster config template.
    ExecutionState string
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    Id string
    The ID of this resource.
    Name string
    The name of the cluster config template.
    Policies []GetClusterConfigTemplatePolicy
    List of policy references.
    Tags []string
    Tags assigned to the cluster config template.
    Context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    attachedClusters List<GetClusterConfigTemplateAttachedCluster>
    List of clusters attached to this template.
    cloudType String
    The cloud type for the cluster template.
    clusterProfiles List<GetClusterConfigTemplateClusterProfile>
    Set of cluster profile references.
    description String
    The description of the cluster config template.
    executionState String
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    id String
    The ID of this resource.
    name String
    The name of the cluster config template.
    policies List<GetClusterConfigTemplatePolicy>
    List of policy references.
    tags List<String>
    Tags assigned to the cluster config template.
    context String
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    attachedClusters GetClusterConfigTemplateAttachedCluster[]
    List of clusters attached to this template.
    cloudType string
    The cloud type for the cluster template.
    clusterProfiles GetClusterConfigTemplateClusterProfile[]
    Set of cluster profile references.
    description string
    The description of the cluster config template.
    executionState string
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    id string
    The ID of this resource.
    name string
    The name of the cluster config template.
    policies GetClusterConfigTemplatePolicy[]
    List of policy references.
    tags string[]
    Tags assigned to the cluster config template.
    context string
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    attached_clusters Sequence[GetClusterConfigTemplateAttachedCluster]
    List of clusters attached to this template.
    cloud_type str
    The cloud type for the cluster template.
    cluster_profiles Sequence[GetClusterConfigTemplateClusterProfile]
    Set of cluster profile references.
    description str
    The description of the cluster config template.
    execution_state str
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    id str
    The ID of this resource.
    name str
    The name of the cluster config template.
    policies Sequence[GetClusterConfigTemplatePolicy]
    List of policy references.
    tags Sequence[str]
    Tags assigned to the cluster config template.
    context str
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    attachedClusters List<Property Map>
    List of clusters attached to this template.
    cloudType String
    The cloud type for the cluster template.
    clusterProfiles List<Property Map>
    Set of cluster profile references.
    description String
    The description of the cluster config template.
    executionState String
    Current execution state of the cluster template. Possible values: Pending, Applied, Failed, PartiallyApplied.
    id String
    The ID of this resource.
    name String
    The name of the cluster config template.
    policies List<Property Map>
    List of policy references.
    tags List<String>
    Tags assigned to the cluster config template.
    context String
    The context of the cluster config template. Allowed values are project or tenant. Default value is project. If the project context is specified, the project name will sourced from the provider configuration parameter project_name.

    Supporting Types

    GetClusterConfigTemplateAttachedCluster

    ClusterUid string
    Name string
    ClusterUid string
    Name string
    clusterUid String
    name String
    clusterUid string
    name string
    clusterUid String
    name String

    GetClusterConfigTemplateClusterProfile

    GetClusterConfigTemplateClusterProfileVariable

    AssignStrategy string
    Name string
    Value string
    AssignStrategy string
    Name string
    Value string
    assignStrategy String
    name String
    value String
    assignStrategy string
    name string
    value string
    assignStrategy String
    name String
    value String

    GetClusterConfigTemplatePolicy

    Id string
    Kind string
    Id string
    Kind string
    id String
    kind String
    id string
    kind string
    id str
    kind str
    id String
    kind String

    Package Details

    Repository
    spectrocloud spectrocloud/terraform-provider-spectrocloud
    License
    Notes
    This Pulumi package is based on the spectrocloud Terraform Provider.
    spectrocloud logo
    spectrocloud 0.26.0 published on Saturday, Nov 22, 2025 by spectrocloud
      Meet Neo: Your AI Platform Teammate