Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
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 dictionaryThe following arguments are supported:
- Hub
Identity string - Identity of the chaos hub.
- Identity string
- Unique identifier of the probe template.
- Name string
- Name of the probe template.
- Org
Id string - Organization identifier.
- Project
Id string - Project identifier.
- Hub
Identity string - Identity of the chaos hub.
- Identity string
- Unique identifier of the probe template.
- Name string
- Name of the probe template.
- Org
Id string - Organization identifier.
- Project
Id string - Project identifier.
- hub
Identity String - Identity of the chaos hub.
- identity String
- Unique identifier of the probe template.
- name String
- Name of the probe template.
- org
Id String - Organization identifier.
- project
Id String - Project identifier.
- hub
Identity string - Identity of the chaos hub.
- identity string
- Unique identifier of the probe template.
- name string
- Name of the probe template.
- org
Id string - Organization identifier.
- project
Id 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.
- hub
Identity String - Identity of the chaos hub.
- identity String
- Unique identifier of the probe template.
- name String
- Name of the probe template.
- org
Id String - Organization identifier.
- project
Id String - Project identifier.
getProbeTemplate Result
The following output properties are available:
- Account
Id string - Account identifier.
- Cmd
Probes List<GetProbe Template Cmd Probe> - Command probe configuration.
- Description string
- Description of the probe template.
- Http
Probes List<GetProbe Template Http Probe> - HTTP probe configuration.
- Hub
Identity string - Identity of the chaos hub.
- Hub
Ref string - Hub reference.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infrastructure
Type string - Infrastructure type.
- Is
Default bool - Whether this is the default version.
- K8s
Probes List<GetProbe Template K8s Probe> - Kubernetes probe configuration.
- Revision int
- Revision number.
- Run
Properties List<GetProbe Template Run Property> - Run properties.
- List<string>
- Tags associated with the probe template.
- Type string
- Type of the probe template.
- Variables
List<Get
Probe Template Variable> - Template variables.
- Identity string
- Unique identifier of the probe template.
- Name string
- Name of the probe template.
- Org
Id string - Organization identifier.
- Project
Id string - Project identifier.
- Account
Id string - Account identifier.
- Cmd
Probes []GetProbe Template Cmd Probe - Command probe configuration.
- Description string
- Description of the probe template.
- Http
Probes []GetProbe Template Http Probe - HTTP probe configuration.
- Hub
Identity string - Identity of the chaos hub.
- Hub
Ref string - Hub reference.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infrastructure
Type string - Infrastructure type.
- Is
Default bool - Whether this is the default version.
- K8s
Probes []GetProbe Template K8s Probe - Kubernetes probe configuration.
- Revision int
- Revision number.
- Run
Properties []GetProbe Template Run Property - Run properties.
- []string
- Tags associated with the probe template.
- Type string
- Type of the probe template.
- Variables
[]Get
Probe Template Variable - Template variables.
- Identity string
- Unique identifier of the probe template.
- Name string
- Name of the probe template.
- Org
Id string - Organization identifier.
- Project
Id string - Project identifier.
- account
Id String - Account identifier.
- cmd
Probes List<GetProbe Template Cmd Probe> - Command probe configuration.
- description String
- Description of the probe template.
- http
Probes List<GetProbe Template Http Probe> - HTTP probe configuration.
- hub
Identity String - Identity of the chaos hub.
- hub
Ref String - Hub reference.
- id String
- The provider-assigned unique ID for this managed resource.
- infrastructure
Type String - Infrastructure type.
- is
Default Boolean - Whether this is the default version.
- k8s
Probes List<GetProbe Template K8s Probe> - Kubernetes probe configuration.
- revision Integer
- Revision number.
- run
Properties List<GetProbe Template Run Property> - Run properties.
- List<String>
- Tags associated with the probe template.
- type String
- Type of the probe template.
- variables
List<Get
Probe Template Variable> - Template variables.
- identity String
- Unique identifier of the probe template.
- name String
- Name of the probe template.
- org
Id String - Organization identifier.
- project
Id String - Project identifier.
- account
Id string - Account identifier.
- cmd
Probes GetProbe Template Cmd Probe[] - Command probe configuration.
- description string
- Description of the probe template.
- http
Probes GetProbe Template Http Probe[] - HTTP probe configuration.
- hub
Identity string - Identity of the chaos hub.
- hub
Ref string - Hub reference.
- id string
- The provider-assigned unique ID for this managed resource.
- infrastructure
Type string - Infrastructure type.
- is
Default boolean - Whether this is the default version.
- k8s
Probes GetProbe Template K8s Probe[] - Kubernetes probe configuration.
- revision number
- Revision number.
- run
Properties GetProbe Template Run Property[] - Run properties.
- string[]
- Tags associated with the probe template.
- type string
- Type of the probe template.
- variables
Get
Probe Template Variable[] - Template variables.
- identity string
- Unique identifier of the probe template.
- name string
- Name of the probe template.
- org
Id string - Organization identifier.
- project
Id string - Project identifier.
- account_
id str - Account identifier.
- cmd_
probes Sequence[GetProbe Template Cmd Probe] - Command probe configuration.
- description str
- Description of the probe template.
- http_
probes Sequence[GetProbe Template Http Probe] - 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[GetProbe Template K8s Probe] - Kubernetes probe configuration.
- revision int
- Revision number.
- run_
properties Sequence[GetProbe Template Run Property] - Run properties.
- Sequence[str]
- Tags associated with the probe template.
- type str
- Type of the probe template.
- variables
Sequence[Get
Probe Template Variable] - 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.
- account
Id String - Account identifier.
- cmd
Probes List<Property Map> - Command probe configuration.
- description String
- Description of the probe template.
- http
Probes List<Property Map> - HTTP probe configuration.
- hub
Identity String - Identity of the chaos hub.
- hub
Ref String - Hub reference.
- id String
- The provider-assigned unique ID for this managed resource.
- infrastructure
Type String - Infrastructure type.
- is
Default Boolean - Whether this is the default version.
- k8s
Probes List<Property Map> - Kubernetes probe configuration.
- revision Number
- Revision number.
- run
Properties List<Property Map> - Run properties.
- 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.
- org
Id String - Organization identifier.
- project
Id String - Project identifier.
Supporting Types
GetProbeTemplateCmdProbe
- Command string
- Comparators
List<Get
Probe Template Cmd Probe Comparator> - Comparator configuration.
- Envs
List<Get
Probe Template Cmd Probe Env> - Environment variables.
- Source string
- Command string
- Comparators
[]Get
Probe Template Cmd Probe Comparator - Comparator configuration.
- Envs
[]Get
Probe Template Cmd Probe Env - Environment variables.
- Source string
- command String
- comparators
List<Get
Probe Template Cmd Probe Comparator> - Comparator configuration.
- envs
List<Get
Probe Template Cmd Probe Env> - Environment variables.
- source String
- command string
- comparators
Get
Probe Template Cmd Probe Comparator[] - Comparator configuration.
- envs
Get
Probe Template Cmd Probe Env[] - Environment variables.
- source string
- command str
- comparators
Sequence[Get
Probe Template Cmd Probe Comparator] - Comparator configuration.
- envs
Sequence[Get
Probe Template Cmd Probe Env] - Environment variables.
- source str
- command String
- comparators List<Property Map>
- Comparator configuration.
- envs List<Property Map>
- Environment variables.
- source String
GetProbeTemplateCmdProbeComparator
GetProbeTemplateCmdProbeEnv
GetProbeTemplateHttpProbe
- Methods
List<Get
Probe Template Http Probe Method> - HTTP method configuration with GET or POST.
- Url string
- Methods
[]Get
Probe Template Http Probe Method - HTTP method configuration with GET or POST.
- Url string
- methods
List<Get
Probe Template Http Probe Method> - HTTP method configuration with GET or POST.
- url String
- methods
Get
Probe Template Http Probe Method[] - HTTP method configuration with GET or POST.
- url string
- methods
Sequence[Get
Probe Template Http Probe Method] - 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<Get
Probe Template Http Probe Method Get> - GET method configuration.
- Posts
List<Get
Probe Template Http Probe Method Post> - POST method configuration.
- Gets
[]Get
Probe Template Http Probe Method Get - GET method configuration.
- Posts
[]Get
Probe Template Http Probe Method Post - POST method configuration.
- gets
List<Get
Probe Template Http Probe Method Get> - GET method configuration.
- posts
List<Get
Probe Template Http Probe Method Post> - POST method configuration.
- gets
Get
Probe Template Http Probe Method Get[] - GET method configuration.
- posts
Get
Probe Template Http Probe Method Post[] - POST method configuration.
- gets
Sequence[Get
Probe Template Http Probe Method Get] - GET method configuration.
- posts
Sequence[Get
Probe Template Http Probe Method Post] - POST method configuration.
- gets List<Property Map>
- GET method configuration.
- posts List<Property Map>
- POST method configuration.
GetProbeTemplateHttpProbeMethodGet
- Criteria string
- Response
Body string - Response
Code string
- Criteria string
- Response
Body string - Response
Code string
- criteria String
- response
Body String - response
Code String
- criteria string
- response
Body string - response
Code string
- criteria str
- response_
body str - response_
code str
- criteria String
- response
Body String - response
Code String
GetProbeTemplateHttpProbeMethodPost
- Body string
- Body
Path string - Content
Type string - Criteria string
- Response
Body string - Response
Code string
- Body string
- Body
Path string - Content
Type string - Criteria string
- Response
Body string - Response
Code string
- body String
- body
Path String - content
Type String - criteria String
- response
Body String - response
Code String
- body string
- body
Path string - content
Type string - criteria string
- response
Body string - response
Code string
- body str
- body_
path str - content_
type str - criteria str
- response_
body str - response_
code str
- body String
- body
Path String - content
Type String - criteria String
- response
Body String - response
Code String
GetProbeTemplateK8sProbe
- Field
Selector string - Label
Selector string - Namespace string
- Operation string
- Resource string
- Version string
- Field
Selector string - Label
Selector string - Namespace string
- Operation string
- Resource string
- Version string
- field
Selector String - label
Selector String - namespace String
- operation String
- resource String
- version String
- field
Selector string - label
Selector string - namespace string
- operation string
- resource string
- version string
- field_
selector str - label_
selector str - namespace str
- operation str
- resource str
- version str
- field
Selector String - label
Selector String - namespace String
- operation String
- resource String
- version String
GetProbeTemplateRunProperty
- Interval string
- Stop
On boolFailure - Timeout string
- Interval string
- Stop
On boolFailure - Timeout string
- interval String
- stop
On BooleanFailure - timeout String
- interval string
- stop
On booleanFailure - timeout string
- interval str
- stop_
on_ boolfailure - timeout str
- interval String
- stop
On BooleanFailure - timeout String
GetProbeTemplateVariable
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.12.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
