1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. chaos
  6. getProbeTemplate
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi

    Data source for retrieving a Harness Chaos Probe Template.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // Example 1: Lookup Probe Template by Identity (Recommended)
    const byIdentity = harness.chaos.getProbeTemplate({
        orgId: "my_org",
        projectId: "my_project",
        hubIdentity: "my-chaos-hub",
        identity: "http-health-check",
    });
    export const probeName = byIdentity.then(byIdentity => byIdentity.name);
    export const probeType = byIdentity.then(byIdentity => byIdentity.type);
    // Example 2: Lookup Probe Template by Name
    const byName = harness.chaos.getProbeTemplate({
        orgId: "my_org",
        projectId: "my_project",
        hubIdentity: "my-chaos-hub",
        name: "HTTP Health Check Probe",
    });
    // Example 3: Use in another resource
    const example = new harness.chaos.Experiment("example", {probe: [{
        name: byIdentity.then(byIdentity => byIdentity.name),
        type: byIdentity.then(byIdentity => byIdentity.type),
    }]});
    
    import pulumi
    import pulumi_harness as harness
    
    # Example 1: Lookup Probe Template by Identity (Recommended)
    by_identity = harness.chaos.get_probe_template(org_id="my_org",
        project_id="my_project",
        hub_identity="my-chaos-hub",
        identity="http-health-check")
    pulumi.export("probeName", by_identity.name)
    pulumi.export("probeType", by_identity.type)
    # Example 2: Lookup Probe Template by Name
    by_name = harness.chaos.get_probe_template(org_id="my_org",
        project_id="my_project",
        hub_identity="my-chaos-hub",
        name="HTTP Health Check Probe")
    # Example 3: Use in another resource
    example = harness.chaos.Experiment("example", probe=[{
        "name": by_identity.name,
        "type": by_identity.type,
    }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/chaos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Example 1: Lookup Probe Template by Identity (Recommended)
    		byIdentity, err := chaos.LookupProbeTemplate(ctx, &chaos.LookupProbeTemplateArgs{
    			OrgId:       pulumi.StringRef("my_org"),
    			ProjectId:   pulumi.StringRef("my_project"),
    			HubIdentity: "my-chaos-hub",
    			Identity:    pulumi.StringRef("http-health-check"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("probeName", byIdentity.Name)
    		ctx.Export("probeType", byIdentity.Type)
    		// Example 2: Lookup Probe Template by Name
    		_, err = chaos.LookupProbeTemplate(ctx, &chaos.LookupProbeTemplateArgs{
    			OrgId:       pulumi.StringRef("my_org"),
    			ProjectId:   pulumi.StringRef("my_project"),
    			HubIdentity: "my-chaos-hub",
    			Name:        pulumi.StringRef("HTTP Health Check Probe"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Example 3: Use in another resource
    		_, err = chaos.NewExperiment(ctx, "example", &chaos.ExperimentArgs{
    			Probe: []map[string]interface{}{
    				map[string]interface{}{
    					"name": byIdentity.Name,
    					"type": byIdentity.Type,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Example 1: Lookup Probe Template by Identity (Recommended)
        var byIdentity = Harness.Chaos.GetProbeTemplate.Invoke(new()
        {
            OrgId = "my_org",
            ProjectId = "my_project",
            HubIdentity = "my-chaos-hub",
            Identity = "http-health-check",
        });
    
        // Example 2: Lookup Probe Template by Name
        var byName = Harness.Chaos.GetProbeTemplate.Invoke(new()
        {
            OrgId = "my_org",
            ProjectId = "my_project",
            HubIdentity = "my-chaos-hub",
            Name = "HTTP Health Check Probe",
        });
    
        // Example 3: Use in another resource
        var example = new Harness.Chaos.Experiment("example", new()
        {
            Probe = new[]
            {
                
                {
                    { "name", byIdentity.Apply(getProbeTemplateResult => getProbeTemplateResult.Name) },
                    { "type", byIdentity.Apply(getProbeTemplateResult => getProbeTemplateResult.Type) },
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["probeName"] = byIdentity.Apply(getProbeTemplateResult => getProbeTemplateResult.Name),
            ["probeType"] = byIdentity.Apply(getProbeTemplateResult => getProbeTemplateResult.Type),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.chaos.ChaosFunctions;
    import com.pulumi.harness.chaos.inputs.GetProbeTemplateArgs;
    import com.pulumi.harness.chaos.Experiment;
    import com.pulumi.harness.chaos.ExperimentArgs;
    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) {
            // Example 1: Lookup Probe Template by Identity (Recommended)
            final var byIdentity = ChaosFunctions.getProbeTemplate(GetProbeTemplateArgs.builder()
                .orgId("my_org")
                .projectId("my_project")
                .hubIdentity("my-chaos-hub")
                .identity("http-health-check")
                .build());
    
            ctx.export("probeName", byIdentity.name());
            ctx.export("probeType", byIdentity.type());
            // Example 2: Lookup Probe Template by Name
            final var byName = ChaosFunctions.getProbeTemplate(GetProbeTemplateArgs.builder()
                .orgId("my_org")
                .projectId("my_project")
                .hubIdentity("my-chaos-hub")
                .name("HTTP Health Check Probe")
                .build());
    
            // Example 3: Use in another resource
            var example = new Experiment("example", ExperimentArgs.builder()
                .probe(List.of(Map.ofEntries(
                    Map.entry("name", byIdentity.name()),
                    Map.entry("type", byIdentity.type())
                )))
                .build());
    
        }
    }
    
    resources:
      # Example 3: Use in another resource
      example:
        type: harness:chaos:Experiment
        properties:
          probe:
            - name: ${byIdentity.name}
              type: ${byIdentity.type}
    variables:
      # Example 1: Lookup Probe Template by Identity (Recommended)
      byIdentity:
        fn::invoke:
          function: harness:chaos:getProbeTemplate
          arguments:
            orgId: my_org
            projectId: my_project
            hubIdentity: my-chaos-hub
            identity: http-health-check
      # Example 2: Lookup Probe Template by Name
      byName:
        fn::invoke:
          function: harness:chaos:getProbeTemplate
          arguments:
            orgId: my_org
            projectId: my_project
            hubIdentity: my-chaos-hub
            name: HTTP Health Check Probe
    outputs:
      # Use the probe template data
      probeName: ${byIdentity.name}
      probeType: ${byIdentity.type}
    

    Using getProbeTemplate

    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 getProbeTemplate(args: GetProbeTemplateArgs, opts?: InvokeOptions): Promise<GetProbeTemplateResult>
    function getProbeTemplateOutput(args: GetProbeTemplateOutputArgs, opts?: InvokeOptions): Output<GetProbeTemplateResult>
    def get_probe_template(hub_identity: Optional[str] = None,
                           identity: Optional[str] = None,
                           name: Optional[str] = None,
                           org_id: Optional[str] = None,
                           project_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetProbeTemplateResult
    def get_probe_template_output(hub_identity: Optional[pulumi.Input[str]] = None,
                           identity: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           org_id: Optional[pulumi.Input[str]] = None,
                           project_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetProbeTemplateResult]
    func LookupProbeTemplate(ctx *Context, args *LookupProbeTemplateArgs, opts ...InvokeOption) (*LookupProbeTemplateResult, error)
    func LookupProbeTemplateOutput(ctx *Context, args *LookupProbeTemplateOutputArgs, opts ...InvokeOption) LookupProbeTemplateResultOutput

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

    public static class GetProbeTemplate 
    {
        public static Task<GetProbeTemplateResult> InvokeAsync(GetProbeTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetProbeTemplateResult> Invoke(GetProbeTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProbeTemplateResult> getProbeTemplate(GetProbeTemplateArgs args, InvokeOptions options)
    public static Output<GetProbeTemplateResult> getProbeTemplate(GetProbeTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: harness:chaos/getProbeTemplate:getProbeTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    HubIdentity string
    Identity of the chaos hub.
    Identity string
    Unique identifier of the probe template.
    Name string
    Name of the probe template.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    HubIdentity string
    Identity of the chaos hub.
    Identity string
    Unique identifier of the probe template.
    Name string
    Name of the probe template.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    hubIdentity String
    Identity of the chaos hub.
    identity String
    Unique identifier of the probe template.
    name String
    Name of the probe template.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.
    hubIdentity string
    Identity of the chaos hub.
    identity string
    Unique identifier of the probe template.
    name string
    Name of the probe template.
    orgId string
    Organization identifier.
    projectId string
    Project identifier.
    hub_identity str
    Identity of the chaos hub.
    identity str
    Unique identifier of the probe template.
    name str
    Name of the probe template.
    org_id str
    Organization identifier.
    project_id str
    Project identifier.
    hubIdentity String
    Identity of the chaos hub.
    identity String
    Unique identifier of the probe template.
    name String
    Name of the probe template.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.

    getProbeTemplate Result

    The following output properties are available:

    AccountId string
    Account identifier.
    CmdProbes List<GetProbeTemplateCmdProbe>
    Command probe configuration.
    Description string
    Description of the probe template.
    HttpProbes List<GetProbeTemplateHttpProbe>
    HTTP probe configuration.
    HubIdentity string
    Identity of the chaos hub.
    HubRef string
    Hub reference.
    Id string
    The provider-assigned unique ID for this managed resource.
    InfrastructureType string
    Infrastructure type.
    IsDefault bool
    Whether this is the default version.
    K8sProbes List<GetProbeTemplateK8sProbe>
    Kubernetes probe configuration.
    Revision int
    Revision number.
    RunProperties List<GetProbeTemplateRunProperty>
    Run properties.
    Tags List<string>
    Tags associated with the probe template.
    Type string
    Type of the probe template.
    Variables List<GetProbeTemplateVariable>
    Template variables.
    Identity string
    Unique identifier of the probe template.
    Name string
    Name of the probe template.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    AccountId string
    Account identifier.
    CmdProbes []GetProbeTemplateCmdProbe
    Command probe configuration.
    Description string
    Description of the probe template.
    HttpProbes []GetProbeTemplateHttpProbe
    HTTP probe configuration.
    HubIdentity string
    Identity of the chaos hub.
    HubRef string
    Hub reference.
    Id string
    The provider-assigned unique ID for this managed resource.
    InfrastructureType string
    Infrastructure type.
    IsDefault bool
    Whether this is the default version.
    K8sProbes []GetProbeTemplateK8sProbe
    Kubernetes probe configuration.
    Revision int
    Revision number.
    RunProperties []GetProbeTemplateRunProperty
    Run properties.
    Tags []string
    Tags associated with the probe template.
    Type string
    Type of the probe template.
    Variables []GetProbeTemplateVariable
    Template variables.
    Identity string
    Unique identifier of the probe template.
    Name string
    Name of the probe template.
    OrgId string
    Organization identifier.
    ProjectId string
    Project identifier.
    accountId String
    Account identifier.
    cmdProbes List<GetProbeTemplateCmdProbe>
    Command probe configuration.
    description String
    Description of the probe template.
    httpProbes List<GetProbeTemplateHttpProbe>
    HTTP probe configuration.
    hubIdentity String
    Identity of the chaos hub.
    hubRef String
    Hub reference.
    id String
    The provider-assigned unique ID for this managed resource.
    infrastructureType String
    Infrastructure type.
    isDefault Boolean
    Whether this is the default version.
    k8sProbes List<GetProbeTemplateK8sProbe>
    Kubernetes probe configuration.
    revision Integer
    Revision number.
    runProperties List<GetProbeTemplateRunProperty>
    Run properties.
    tags List<String>
    Tags associated with the probe template.
    type String
    Type of the probe template.
    variables List<GetProbeTemplateVariable>
    Template variables.
    identity String
    Unique identifier of the probe template.
    name String
    Name of the probe template.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.
    accountId string
    Account identifier.
    cmdProbes GetProbeTemplateCmdProbe[]
    Command probe configuration.
    description string
    Description of the probe template.
    httpProbes GetProbeTemplateHttpProbe[]
    HTTP probe configuration.
    hubIdentity string
    Identity of the chaos hub.
    hubRef string
    Hub reference.
    id string
    The provider-assigned unique ID for this managed resource.
    infrastructureType string
    Infrastructure type.
    isDefault boolean
    Whether this is the default version.
    k8sProbes GetProbeTemplateK8sProbe[]
    Kubernetes probe configuration.
    revision number
    Revision number.
    runProperties GetProbeTemplateRunProperty[]
    Run properties.
    tags string[]
    Tags associated with the probe template.
    type string
    Type of the probe template.
    variables GetProbeTemplateVariable[]
    Template variables.
    identity string
    Unique identifier of the probe template.
    name string
    Name of the probe template.
    orgId string
    Organization identifier.
    projectId string
    Project identifier.
    account_id str
    Account identifier.
    cmd_probes Sequence[GetProbeTemplateCmdProbe]
    Command probe configuration.
    description str
    Description of the probe template.
    http_probes Sequence[GetProbeTemplateHttpProbe]
    HTTP probe configuration.
    hub_identity str
    Identity of the chaos hub.
    hub_ref str
    Hub reference.
    id str
    The provider-assigned unique ID for this managed resource.
    infrastructure_type str
    Infrastructure type.
    is_default bool
    Whether this is the default version.
    k8s_probes Sequence[GetProbeTemplateK8sProbe]
    Kubernetes probe configuration.
    revision int
    Revision number.
    run_properties Sequence[GetProbeTemplateRunProperty]
    Run properties.
    tags Sequence[str]
    Tags associated with the probe template.
    type str
    Type of the probe template.
    variables Sequence[GetProbeTemplateVariable]
    Template variables.
    identity str
    Unique identifier of the probe template.
    name str
    Name of the probe template.
    org_id str
    Organization identifier.
    project_id str
    Project identifier.
    accountId String
    Account identifier.
    cmdProbes List<Property Map>
    Command probe configuration.
    description String
    Description of the probe template.
    httpProbes List<Property Map>
    HTTP probe configuration.
    hubIdentity String
    Identity of the chaos hub.
    hubRef String
    Hub reference.
    id String
    The provider-assigned unique ID for this managed resource.
    infrastructureType String
    Infrastructure type.
    isDefault Boolean
    Whether this is the default version.
    k8sProbes List<Property Map>
    Kubernetes probe configuration.
    revision Number
    Revision number.
    runProperties List<Property Map>
    Run properties.
    tags List<String>
    Tags associated with the probe template.
    type String
    Type of the probe template.
    variables List<Property Map>
    Template variables.
    identity String
    Unique identifier of the probe template.
    name String
    Name of the probe template.
    orgId String
    Organization identifier.
    projectId String
    Project identifier.

    Supporting Types

    GetProbeTemplateCmdProbe

    Command string
    Comparators []GetProbeTemplateCmdProbeComparator
    Comparator configuration.
    Envs []GetProbeTemplateCmdProbeEnv
    Environment variables.
    Source string
    command string
    comparators GetProbeTemplateCmdProbeComparator[]
    Comparator configuration.
    envs GetProbeTemplateCmdProbeEnv[]
    Environment variables.
    source string
    command String
    comparators List<Property Map>
    Comparator configuration.
    envs List<Property Map>
    Environment variables.
    source String

    GetProbeTemplateCmdProbeComparator

    Criteria string
    Type string
    Value string
    Criteria string
    Type string
    Value string
    criteria String
    type String
    value String
    criteria string
    type string
    value string
    criteria str
    type str
    value str
    criteria String
    type String
    value String

    GetProbeTemplateCmdProbeEnv

    Name string
    Value string
    Name string
    Value string
    name String
    value String
    name string
    value string
    name str
    value str
    name String
    value String

    GetProbeTemplateHttpProbe

    Methods List<GetProbeTemplateHttpProbeMethod>
    HTTP method configuration with GET or POST.
    Url string
    Methods []GetProbeTemplateHttpProbeMethod
    HTTP method configuration with GET or POST.
    Url string
    methods List<GetProbeTemplateHttpProbeMethod>
    HTTP method configuration with GET or POST.
    url String
    methods GetProbeTemplateHttpProbeMethod[]
    HTTP method configuration with GET or POST.
    url string
    methods Sequence[GetProbeTemplateHttpProbeMethod]
    HTTP method configuration with GET or POST.
    url str
    methods List<Property Map>
    HTTP method configuration with GET or POST.
    url String

    GetProbeTemplateHttpProbeMethod

    gets List<Property Map>
    GET method configuration.
    posts List<Property Map>
    POST method configuration.

    GetProbeTemplateHttpProbeMethodGet

    GetProbeTemplateHttpProbeMethodPost

    Body string
    BodyPath string
    ContentType string
    Criteria string
    ResponseBody string
    ResponseCode string
    Body string
    BodyPath string
    ContentType string
    Criteria string
    ResponseBody string
    ResponseCode string
    body String
    bodyPath String
    contentType String
    criteria String
    responseBody String
    responseCode String
    body string
    bodyPath string
    contentType string
    criteria string
    responseBody string
    responseCode string
    body String
    bodyPath String
    contentType String
    criteria String
    responseBody String
    responseCode String

    GetProbeTemplateK8sProbe

    FieldSelector string
    LabelSelector string
    Namespace string
    Operation string
    Resource string
    Version string
    FieldSelector string
    LabelSelector string
    Namespace string
    Operation string
    Resource string
    Version string
    fieldSelector String
    labelSelector String
    namespace String
    operation String
    resource String
    version String
    fieldSelector string
    labelSelector string
    namespace string
    operation string
    resource string
    version string
    fieldSelector String
    labelSelector String
    namespace String
    operation String
    resource String
    version String

    GetProbeTemplateRunProperty

    Interval string
    StopOnFailure bool
    Timeout string
    Interval string
    StopOnFailure bool
    Timeout string
    interval String
    stopOnFailure Boolean
    timeout String
    interval string
    stopOnFailure boolean
    timeout string
    interval String
    stopOnFailure Boolean
    timeout String

    GetProbeTemplateVariable

    Name string
    Required bool
    Type string
    Value string
    Name string
    Required bool
    Type string
    Value string
    name String
    required Boolean
    type String
    value String
    name string
    required boolean
    type string
    value string
    name str
    required bool
    type str
    value str
    name String
    required Boolean
    type String
    value String

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.12.0
    published on Tuesday, Apr 21, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.