published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
Resource for managing Harness Chaos Experiment Templates. Experiment templates define reusable chaos experiments with actions, faults, and probes.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// ============================================================================
// Harness Chaos Experiment Template Resource Examples
// ============================================================================
//
// Experiment templates define complete chaos experiments with actions, faults, and probes.
// These examples are based on TESTED configurations from the e2e-test suite.
//
// Key Points:
// - Templates combine actions, faults, and probes into workflows
// - Vertices define execution order (workflow graph)
// - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
// - Enterprise features: is_enterprise = true
// ============================================================================
// ----------------------------------------------------------------------------
// Example 1: Simple Fault Template (TESTED ✅)
// ----------------------------------------------------------------------------
// Basic template with single fault
const simpleFault = new harness.chaos.ExperimentTemplate("simple_fault", {
orgId: _this.id,
projectId: thisHarnessPlatformProject.id,
hubIdentity: projectLevel.identity,
identity: "simple-pod-delete",
name: "Simple Pod Delete Experiment",
description: "Basic experiment with single pod delete fault",
tags: [
"kubernetes",
"pod-delete",
"simple",
],
spec: {
infraType: "KubernetesV2",
faults: [{
identity: "pod-delete",
name: "pod-delete-fault",
revision: "v1",
isEnterprise: true,
authEnabled: false,
values: [
{
name: "TARGET_WORKLOAD_KIND",
value: "deployment",
},
{
name: "TARGET_WORKLOAD_NAMESPACE",
value: "<+input>.default('default')",
},
{
name: "TOTAL_CHAOS_DURATION",
value: "<+input>.default('30s')",
},
],
}],
vertices: [{
name: "pod-delete-vertex",
start: {
faults: [{
name: "pod-delete-fault",
}],
},
end: {},
}],
cleanupPolicy: "delete",
},
}, {
dependsOn: [projectLevel],
});
// ----------------------------------------------------------------------------
// Example 2: Template with Action and Fault (TESTED ✅)
// ----------------------------------------------------------------------------
// Template combining action and fault
const withAction = new harness.chaos.ExperimentTemplate("with_action", {
orgId: _this.id,
projectId: thisHarnessPlatformProject.id,
hubIdentity: projectLevel.identity,
identity: "action-and-fault",
name: "Action and Fault Experiment",
description: "Experiment with action before fault",
tags: [
"kubernetes",
"action",
"fault",
],
spec: {
infraType: "KubernetesV2",
actions: [{
identity: "notification-action",
name: "pre-chaos-notification",
isEnterprise: false,
continueOnCompletion: false,
values: [{
name: "MESSAGE",
value: "Starting chaos experiment",
}],
}],
faults: [{
identity: "container-kill",
name: "container-kill-fault",
revision: "v1",
isEnterprise: true,
authEnabled: false,
values: [
{
name: "TARGET_WORKLOAD_KIND",
value: "deployment",
},
{
name: "TARGET_WORKLOAD_NAMESPACE",
value: "<+input>",
},
{
name: "TOTAL_CHAOS_DURATION",
value: "<+input>.default('30s')",
},
],
}],
vertices: [
{
name: "action-vertex",
start: {
actions: [{
name: "pre-chaos-notification",
}],
},
end: {},
},
{
name: "fault-vertex",
start: {
faults: [{
name: "container-kill-fault",
}],
},
end: {},
},
],
cleanupPolicy: "delete",
},
}, {
dependsOn: [projectLevel],
});
// ----------------------------------------------------------------------------
// Example 3: Complex Template with Probes (TESTED ✅)
// ----------------------------------------------------------------------------
// Complete template with actions, faults, and probes
const complex = new harness.chaos.ExperimentTemplate("complex", {
orgId: _this.id,
projectId: thisHarnessPlatformProject.id,
hubIdentity: projectLevel.identity,
identity: "complex-experiment",
name: "Complex Chaos Experiment",
description: "Complete experiment with actions, faults, and probes",
tags: [
"kubernetes",
"complex",
"enterprise",
],
spec: {
infraType: "KubernetesV2",
actions: [{
identity: "notification-action",
name: "start-notification",
isEnterprise: false,
continueOnCompletion: false,
values: [{
name: "MESSAGE",
value: "Chaos experiment started",
}],
}],
faults: [
{
identity: "pod-delete",
name: "pod-delete-fault",
revision: "v1",
isEnterprise: true,
authEnabled: false,
values: [
{
name: "TARGET_WORKLOAD_KIND",
value: "deployment",
},
{
name: "TARGET_WORKLOAD_NAMESPACE",
value: "<+input>",
},
{
name: "TOTAL_CHAOS_DURATION",
value: "<+input>.default('30s')",
},
],
},
{
identity: "pod-network-latency",
name: "network-latency-fault",
revision: "v1",
isEnterprise: true,
authEnabled: false,
values: [
{
name: "TARGET_WORKLOAD_KIND",
value: "deployment",
},
{
name: "TARGET_WORKLOAD_NAMESPACE",
value: "<+input>",
},
{
name: "NETWORK_LATENCY",
value: "<+input>.default('2000')",
},
],
},
],
probes: [
{
identity: "pod-status-check",
name: "pod-status-probe",
revision: "v1",
isEnterprise: true,
duration: "30",
weightage: 10,
enableDataCollection: false,
conditions: [
"onChaosStart",
"duringChaos",
"afterChaos",
],
values: [{
name: "TARGET_NAMESPACE",
value: "<+input>",
}],
},
{
identity: "http-health-check",
name: "http-health-probe",
revision: "v1",
isEnterprise: true,
duration: "30",
weightage: 10,
enableDataCollection: false,
conditions: [
"duringChaos",
"afterChaos",
],
values: [{
name: "URL",
value: "<+input>",
}],
},
],
vertices: [
{
name: "action-stage",
start: {
actions: [{
name: "start-notification",
}],
},
end: {},
},
{
name: "fault-stage",
start: {
faults: [
{
name: "pod-delete-fault",
},
{
name: "network-latency-fault",
},
],
probes: [
{
name: "pod-status-probe",
},
{
name: "http-health-probe",
},
],
},
end: {},
},
{
name: "cleanup-stage",
start: {},
end: {},
},
],
cleanupPolicy: "delete",
statusCheckTimeouts: {
delay: 5,
timeout: 300,
},
},
}, {
dependsOn: [projectLevel],
});
import pulumi
import pulumi_harness as harness
# ============================================================================
# Harness Chaos Experiment Template Resource Examples
# ============================================================================
#
# Experiment templates define complete chaos experiments with actions, faults, and probes.
# These examples are based on TESTED configurations from the e2e-test suite.
#
# Key Points:
# - Templates combine actions, faults, and probes into workflows
# - Vertices define execution order (workflow graph)
# - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
# - Enterprise features: is_enterprise = true
# ============================================================================
# ----------------------------------------------------------------------------
# Example 1: Simple Fault Template (TESTED ✅)
# ----------------------------------------------------------------------------
# Basic template with single fault
simple_fault = harness.chaos.ExperimentTemplate("simple_fault",
org_id=this["id"],
project_id=this_harness_platform_project["id"],
hub_identity=project_level["identity"],
identity="simple-pod-delete",
name="Simple Pod Delete Experiment",
description="Basic experiment with single pod delete fault",
tags=[
"kubernetes",
"pod-delete",
"simple",
],
spec={
"infra_type": "KubernetesV2",
"faults": [{
"identity": "pod-delete",
"name": "pod-delete-fault",
"revision": "v1",
"is_enterprise": True,
"auth_enabled": False,
"values": [
{
"name": "TARGET_WORKLOAD_KIND",
"value": "deployment",
},
{
"name": "TARGET_WORKLOAD_NAMESPACE",
"value": "<+input>.default('default')",
},
{
"name": "TOTAL_CHAOS_DURATION",
"value": "<+input>.default('30s')",
},
],
}],
"vertices": [{
"name": "pod-delete-vertex",
"start": {
"faults": [{
"name": "pod-delete-fault",
}],
},
"end": {},
}],
"cleanup_policy": "delete",
},
opts = pulumi.ResourceOptions(depends_on=[project_level]))
# ----------------------------------------------------------------------------
# Example 2: Template with Action and Fault (TESTED ✅)
# ----------------------------------------------------------------------------
# Template combining action and fault
with_action = harness.chaos.ExperimentTemplate("with_action",
org_id=this["id"],
project_id=this_harness_platform_project["id"],
hub_identity=project_level["identity"],
identity="action-and-fault",
name="Action and Fault Experiment",
description="Experiment with action before fault",
tags=[
"kubernetes",
"action",
"fault",
],
spec={
"infra_type": "KubernetesV2",
"actions": [{
"identity": "notification-action",
"name": "pre-chaos-notification",
"is_enterprise": False,
"continue_on_completion": False,
"values": [{
"name": "MESSAGE",
"value": "Starting chaos experiment",
}],
}],
"faults": [{
"identity": "container-kill",
"name": "container-kill-fault",
"revision": "v1",
"is_enterprise": True,
"auth_enabled": False,
"values": [
{
"name": "TARGET_WORKLOAD_KIND",
"value": "deployment",
},
{
"name": "TARGET_WORKLOAD_NAMESPACE",
"value": "<+input>",
},
{
"name": "TOTAL_CHAOS_DURATION",
"value": "<+input>.default('30s')",
},
],
}],
"vertices": [
{
"name": "action-vertex",
"start": {
"actions": [{
"name": "pre-chaos-notification",
}],
},
"end": {},
},
{
"name": "fault-vertex",
"start": {
"faults": [{
"name": "container-kill-fault",
}],
},
"end": {},
},
],
"cleanup_policy": "delete",
},
opts = pulumi.ResourceOptions(depends_on=[project_level]))
# ----------------------------------------------------------------------------
# Example 3: Complex Template with Probes (TESTED ✅)
# ----------------------------------------------------------------------------
# Complete template with actions, faults, and probes
complex = harness.chaos.ExperimentTemplate("complex",
org_id=this["id"],
project_id=this_harness_platform_project["id"],
hub_identity=project_level["identity"],
identity="complex-experiment",
name="Complex Chaos Experiment",
description="Complete experiment with actions, faults, and probes",
tags=[
"kubernetes",
"complex",
"enterprise",
],
spec={
"infra_type": "KubernetesV2",
"actions": [{
"identity": "notification-action",
"name": "start-notification",
"is_enterprise": False,
"continue_on_completion": False,
"values": [{
"name": "MESSAGE",
"value": "Chaos experiment started",
}],
}],
"faults": [
{
"identity": "pod-delete",
"name": "pod-delete-fault",
"revision": "v1",
"is_enterprise": True,
"auth_enabled": False,
"values": [
{
"name": "TARGET_WORKLOAD_KIND",
"value": "deployment",
},
{
"name": "TARGET_WORKLOAD_NAMESPACE",
"value": "<+input>",
},
{
"name": "TOTAL_CHAOS_DURATION",
"value": "<+input>.default('30s')",
},
],
},
{
"identity": "pod-network-latency",
"name": "network-latency-fault",
"revision": "v1",
"is_enterprise": True,
"auth_enabled": False,
"values": [
{
"name": "TARGET_WORKLOAD_KIND",
"value": "deployment",
},
{
"name": "TARGET_WORKLOAD_NAMESPACE",
"value": "<+input>",
},
{
"name": "NETWORK_LATENCY",
"value": "<+input>.default('2000')",
},
],
},
],
"probes": [
{
"identity": "pod-status-check",
"name": "pod-status-probe",
"revision": "v1",
"is_enterprise": True,
"duration": "30",
"weightage": 10,
"enable_data_collection": False,
"conditions": [
"onChaosStart",
"duringChaos",
"afterChaos",
],
"values": [{
"name": "TARGET_NAMESPACE",
"value": "<+input>",
}],
},
{
"identity": "http-health-check",
"name": "http-health-probe",
"revision": "v1",
"is_enterprise": True,
"duration": "30",
"weightage": 10,
"enable_data_collection": False,
"conditions": [
"duringChaos",
"afterChaos",
],
"values": [{
"name": "URL",
"value": "<+input>",
}],
},
],
"vertices": [
{
"name": "action-stage",
"start": {
"actions": [{
"name": "start-notification",
}],
},
"end": {},
},
{
"name": "fault-stage",
"start": {
"faults": [
{
"name": "pod-delete-fault",
},
{
"name": "network-latency-fault",
},
],
"probes": [
{
"name": "pod-status-probe",
},
{
"name": "http-health-probe",
},
],
},
"end": {},
},
{
"name": "cleanup-stage",
"start": {},
"end": {},
},
],
"cleanup_policy": "delete",
"status_check_timeouts": {
"delay": 5,
"timeout": 300,
},
},
opts = pulumi.ResourceOptions(depends_on=[project_level]))
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 {
// ============================================================================
// Harness Chaos Experiment Template Resource Examples
// ============================================================================
//
// Experiment templates define complete chaos experiments with actions, faults, and probes.
// These examples are based on TESTED configurations from the e2e-test suite.
//
// Key Points:
// - Templates combine actions, faults, and probes into workflows
// - Vertices define execution order (workflow graph)
// - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
// - Enterprise features: is_enterprise = true
// ============================================================================
// ----------------------------------------------------------------------------
// Example 1: Simple Fault Template (TESTED ✅)
// ----------------------------------------------------------------------------
// Basic template with single fault
_, err := chaos.NewExperimentTemplate(ctx, "simple_fault", &chaos.ExperimentTemplateArgs{
OrgId: pulumi.Any(this.Id),
ProjectId: pulumi.Any(thisHarnessPlatformProject.Id),
HubIdentity: pulumi.Any(projectLevel.Identity),
Identity: pulumi.String("simple-pod-delete"),
Name: pulumi.String("Simple Pod Delete Experiment"),
Description: pulumi.String("Basic experiment with single pod delete fault"),
Tags: pulumi.StringArray{
pulumi.String("kubernetes"),
pulumi.String("pod-delete"),
pulumi.String("simple"),
},
Spec: &chaos.ExperimentTemplateSpecArgs{
InfraType: pulumi.String("KubernetesV2"),
Faults: chaos.ExperimentTemplateSpecFaultArray{
&chaos.ExperimentTemplateSpecFaultArgs{
Identity: pulumi.String("pod-delete"),
Name: pulumi.String("pod-delete-fault"),
Revision: pulumi.String("v1"),
IsEnterprise: pulumi.Bool(true),
AuthEnabled: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecFaultValueArray{
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_KIND"),
Value: pulumi.String("deployment"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_NAMESPACE"),
Value: pulumi.String("<+input>.default('default')"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TOTAL_CHAOS_DURATION"),
Value: pulumi.String("<+input>.default('30s')"),
},
},
},
},
Vertices: chaos.ExperimentTemplateSpecVertexArray{
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("pod-delete-vertex"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{
Faults: chaos.ExperimentTemplateSpecVertexStartFaultArray{
&chaos.ExperimentTemplateSpecVertexStartFaultArgs{
Name: pulumi.String("pod-delete-fault"),
},
},
},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
},
CleanupPolicy: pulumi.String("delete"),
},
}, pulumi.DependsOn([]pulumi.Resource{
projectLevel,
}))
if err != nil {
return err
}
// ----------------------------------------------------------------------------
// Example 2: Template with Action and Fault (TESTED ✅)
// ----------------------------------------------------------------------------
// Template combining action and fault
_, err = chaos.NewExperimentTemplate(ctx, "with_action", &chaos.ExperimentTemplateArgs{
OrgId: pulumi.Any(this.Id),
ProjectId: pulumi.Any(thisHarnessPlatformProject.Id),
HubIdentity: pulumi.Any(projectLevel.Identity),
Identity: pulumi.String("action-and-fault"),
Name: pulumi.String("Action and Fault Experiment"),
Description: pulumi.String("Experiment with action before fault"),
Tags: pulumi.StringArray{
pulumi.String("kubernetes"),
pulumi.String("action"),
pulumi.String("fault"),
},
Spec: &chaos.ExperimentTemplateSpecArgs{
InfraType: pulumi.String("KubernetesV2"),
Actions: chaos.ExperimentTemplateSpecActionArray{
&chaos.ExperimentTemplateSpecActionArgs{
Identity: pulumi.String("notification-action"),
Name: pulumi.String("pre-chaos-notification"),
IsEnterprise: pulumi.Bool(false),
ContinueOnCompletion: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecActionValueArray{
&chaos.ExperimentTemplateSpecActionValueArgs{
Name: pulumi.String("MESSAGE"),
Value: pulumi.String("Starting chaos experiment"),
},
},
},
},
Faults: chaos.ExperimentTemplateSpecFaultArray{
&chaos.ExperimentTemplateSpecFaultArgs{
Identity: pulumi.String("container-kill"),
Name: pulumi.String("container-kill-fault"),
Revision: pulumi.String("v1"),
IsEnterprise: pulumi.Bool(true),
AuthEnabled: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecFaultValueArray{
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_KIND"),
Value: pulumi.String("deployment"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_NAMESPACE"),
Value: pulumi.String("<+input>"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TOTAL_CHAOS_DURATION"),
Value: pulumi.String("<+input>.default('30s')"),
},
},
},
},
Vertices: chaos.ExperimentTemplateSpecVertexArray{
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("action-vertex"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{
Actions: chaos.ExperimentTemplateSpecVertexStartActionArray{
&chaos.ExperimentTemplateSpecVertexStartActionArgs{
Name: pulumi.String("pre-chaos-notification"),
},
},
},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("fault-vertex"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{
Faults: chaos.ExperimentTemplateSpecVertexStartFaultArray{
&chaos.ExperimentTemplateSpecVertexStartFaultArgs{
Name: pulumi.String("container-kill-fault"),
},
},
},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
},
CleanupPolicy: pulumi.String("delete"),
},
}, pulumi.DependsOn([]pulumi.Resource{
projectLevel,
}))
if err != nil {
return err
}
// ----------------------------------------------------------------------------
// Example 3: Complex Template with Probes (TESTED ✅)
// ----------------------------------------------------------------------------
// Complete template with actions, faults, and probes
_, err = chaos.NewExperimentTemplate(ctx, "complex", &chaos.ExperimentTemplateArgs{
OrgId: pulumi.Any(this.Id),
ProjectId: pulumi.Any(thisHarnessPlatformProject.Id),
HubIdentity: pulumi.Any(projectLevel.Identity),
Identity: pulumi.String("complex-experiment"),
Name: pulumi.String("Complex Chaos Experiment"),
Description: pulumi.String("Complete experiment with actions, faults, and probes"),
Tags: pulumi.StringArray{
pulumi.String("kubernetes"),
pulumi.String("complex"),
pulumi.String("enterprise"),
},
Spec: &chaos.ExperimentTemplateSpecArgs{
InfraType: pulumi.String("KubernetesV2"),
Actions: chaos.ExperimentTemplateSpecActionArray{
&chaos.ExperimentTemplateSpecActionArgs{
Identity: pulumi.String("notification-action"),
Name: pulumi.String("start-notification"),
IsEnterprise: pulumi.Bool(false),
ContinueOnCompletion: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecActionValueArray{
&chaos.ExperimentTemplateSpecActionValueArgs{
Name: pulumi.String("MESSAGE"),
Value: pulumi.String("Chaos experiment started"),
},
},
},
},
Faults: chaos.ExperimentTemplateSpecFaultArray{
&chaos.ExperimentTemplateSpecFaultArgs{
Identity: pulumi.String("pod-delete"),
Name: pulumi.String("pod-delete-fault"),
Revision: pulumi.String("v1"),
IsEnterprise: pulumi.Bool(true),
AuthEnabled: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecFaultValueArray{
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_KIND"),
Value: pulumi.String("deployment"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_NAMESPACE"),
Value: pulumi.String("<+input>"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TOTAL_CHAOS_DURATION"),
Value: pulumi.String("<+input>.default('30s')"),
},
},
},
&chaos.ExperimentTemplateSpecFaultArgs{
Identity: pulumi.String("pod-network-latency"),
Name: pulumi.String("network-latency-fault"),
Revision: pulumi.String("v1"),
IsEnterprise: pulumi.Bool(true),
AuthEnabled: pulumi.Bool(false),
Values: chaos.ExperimentTemplateSpecFaultValueArray{
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_KIND"),
Value: pulumi.String("deployment"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("TARGET_WORKLOAD_NAMESPACE"),
Value: pulumi.String("<+input>"),
},
&chaos.ExperimentTemplateSpecFaultValueArgs{
Name: pulumi.String("NETWORK_LATENCY"),
Value: pulumi.String("<+input>.default('2000')"),
},
},
},
},
Probes: chaos.ExperimentTemplateSpecProbeArray{
&chaos.ExperimentTemplateSpecProbeArgs{
Identity: pulumi.String("pod-status-check"),
Name: pulumi.String("pod-status-probe"),
Revision: pulumi.Int("v1"),
IsEnterprise: pulumi.Bool(true),
Duration: pulumi.String("30"),
Weightage: pulumi.Int(10),
EnableDataCollection: pulumi.Bool(false),
Conditions: chaos.ExperimentTemplateSpecProbeConditionArray{
"onChaosStart",
"duringChaos",
"afterChaos",
},
Values: chaos.ExperimentTemplateSpecProbeValueArray{
&chaos.ExperimentTemplateSpecProbeValueArgs{
Name: pulumi.String("TARGET_NAMESPACE"),
Value: pulumi.String("<+input>"),
},
},
},
&chaos.ExperimentTemplateSpecProbeArgs{
Identity: pulumi.String("http-health-check"),
Name: pulumi.String("http-health-probe"),
Revision: pulumi.Int("v1"),
IsEnterprise: pulumi.Bool(true),
Duration: pulumi.String("30"),
Weightage: pulumi.Int(10),
EnableDataCollection: pulumi.Bool(false),
Conditions: chaos.ExperimentTemplateSpecProbeConditionArray{
"duringChaos",
"afterChaos",
},
Values: chaos.ExperimentTemplateSpecProbeValueArray{
&chaos.ExperimentTemplateSpecProbeValueArgs{
Name: pulumi.String("URL"),
Value: pulumi.String("<+input>"),
},
},
},
},
Vertices: chaos.ExperimentTemplateSpecVertexArray{
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("action-stage"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{
Actions: chaos.ExperimentTemplateSpecVertexStartActionArray{
&chaos.ExperimentTemplateSpecVertexStartActionArgs{
Name: pulumi.String("start-notification"),
},
},
},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("fault-stage"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{
Faults: chaos.ExperimentTemplateSpecVertexStartFaultArray{
&chaos.ExperimentTemplateSpecVertexStartFaultArgs{
Name: pulumi.String("pod-delete-fault"),
},
&chaos.ExperimentTemplateSpecVertexStartFaultArgs{
Name: pulumi.String("network-latency-fault"),
},
},
Probes: chaos.ExperimentTemplateSpecVertexStartProbeArray{
&chaos.ExperimentTemplateSpecVertexStartProbeArgs{
Name: pulumi.String("pod-status-probe"),
},
&chaos.ExperimentTemplateSpecVertexStartProbeArgs{
Name: pulumi.String("http-health-probe"),
},
},
},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
&chaos.ExperimentTemplateSpecVertexArgs{
Name: pulumi.String("cleanup-stage"),
Start: &chaos.ExperimentTemplateSpecVertexStartArgs{},
End: &chaos.ExperimentTemplateSpecVertexEndArgs{},
},
},
CleanupPolicy: pulumi.String("delete"),
StatusCheckTimeouts: &chaos.ExperimentTemplateSpecStatusCheckTimeoutsArgs{
Delay: pulumi.Int(5),
Timeout: pulumi.Int(300),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
projectLevel,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
// ============================================================================
// Harness Chaos Experiment Template Resource Examples
// ============================================================================
//
// Experiment templates define complete chaos experiments with actions, faults, and probes.
// These examples are based on TESTED configurations from the e2e-test suite.
//
// Key Points:
// - Templates combine actions, faults, and probes into workflows
// - Vertices define execution order (workflow graph)
// - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
// - Enterprise features: is_enterprise = true
// ============================================================================
// ----------------------------------------------------------------------------
// Example 1: Simple Fault Template (TESTED ✅)
// ----------------------------------------------------------------------------
// Basic template with single fault
var simpleFault = new Harness.Chaos.ExperimentTemplate("simple_fault", new()
{
OrgId = @this.Id,
ProjectId = thisHarnessPlatformProject.Id,
HubIdentity = projectLevel.Identity,
Identity = "simple-pod-delete",
Name = "Simple Pod Delete Experiment",
Description = "Basic experiment with single pod delete fault",
Tags = new[]
{
"kubernetes",
"pod-delete",
"simple",
},
Spec = new Harness.Chaos.Inputs.ExperimentTemplateSpecArgs
{
InfraType = "KubernetesV2",
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultArgs
{
Identity = "pod-delete",
Name = "pod-delete-fault",
Revision = "v1",
IsEnterprise = true,
AuthEnabled = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_KIND",
Value = "deployment",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_NAMESPACE",
Value = "<+input>.default('default')",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TOTAL_CHAOS_DURATION",
Value = "<+input>.default('30s')",
},
},
},
},
Vertices = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "pod-delete-vertex",
Start = new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartArgs
{
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartFaultArgs
{
Name = "pod-delete-fault",
},
},
},
End = null,
},
},
CleanupPolicy = "delete",
},
}, new CustomResourceOptions
{
DependsOn =
{
projectLevel,
},
});
// ----------------------------------------------------------------------------
// Example 2: Template with Action and Fault (TESTED ✅)
// ----------------------------------------------------------------------------
// Template combining action and fault
var withAction = new Harness.Chaos.ExperimentTemplate("with_action", new()
{
OrgId = @this.Id,
ProjectId = thisHarnessPlatformProject.Id,
HubIdentity = projectLevel.Identity,
Identity = "action-and-fault",
Name = "Action and Fault Experiment",
Description = "Experiment with action before fault",
Tags = new[]
{
"kubernetes",
"action",
"fault",
},
Spec = new Harness.Chaos.Inputs.ExperimentTemplateSpecArgs
{
InfraType = "KubernetesV2",
Actions = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecActionArgs
{
Identity = "notification-action",
Name = "pre-chaos-notification",
IsEnterprise = false,
ContinueOnCompletion = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecActionValueArgs
{
Name = "MESSAGE",
Value = "Starting chaos experiment",
},
},
},
},
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultArgs
{
Identity = "container-kill",
Name = "container-kill-fault",
Revision = "v1",
IsEnterprise = true,
AuthEnabled = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_KIND",
Value = "deployment",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_NAMESPACE",
Value = "<+input>",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TOTAL_CHAOS_DURATION",
Value = "<+input>.default('30s')",
},
},
},
},
Vertices = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "action-vertex",
Start = new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartArgs
{
Actions = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartActionArgs
{
Name = "pre-chaos-notification",
},
},
},
End = null,
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "fault-vertex",
Start = new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartArgs
{
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartFaultArgs
{
Name = "container-kill-fault",
},
},
},
End = null,
},
},
CleanupPolicy = "delete",
},
}, new CustomResourceOptions
{
DependsOn =
{
projectLevel,
},
});
// ----------------------------------------------------------------------------
// Example 3: Complex Template with Probes (TESTED ✅)
// ----------------------------------------------------------------------------
// Complete template with actions, faults, and probes
var complex = new Harness.Chaos.ExperimentTemplate("complex", new()
{
OrgId = @this.Id,
ProjectId = thisHarnessPlatformProject.Id,
HubIdentity = projectLevel.Identity,
Identity = "complex-experiment",
Name = "Complex Chaos Experiment",
Description = "Complete experiment with actions, faults, and probes",
Tags = new[]
{
"kubernetes",
"complex",
"enterprise",
},
Spec = new Harness.Chaos.Inputs.ExperimentTemplateSpecArgs
{
InfraType = "KubernetesV2",
Actions = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecActionArgs
{
Identity = "notification-action",
Name = "start-notification",
IsEnterprise = false,
ContinueOnCompletion = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecActionValueArgs
{
Name = "MESSAGE",
Value = "Chaos experiment started",
},
},
},
},
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultArgs
{
Identity = "pod-delete",
Name = "pod-delete-fault",
Revision = "v1",
IsEnterprise = true,
AuthEnabled = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_KIND",
Value = "deployment",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_NAMESPACE",
Value = "<+input>",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TOTAL_CHAOS_DURATION",
Value = "<+input>.default('30s')",
},
},
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultArgs
{
Identity = "pod-network-latency",
Name = "network-latency-fault",
Revision = "v1",
IsEnterprise = true,
AuthEnabled = false,
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_KIND",
Value = "deployment",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "TARGET_WORKLOAD_NAMESPACE",
Value = "<+input>",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecFaultValueArgs
{
Name = "NETWORK_LATENCY",
Value = "<+input>.default('2000')",
},
},
},
},
Probes = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecProbeArgs
{
Identity = "pod-status-check",
Name = "pod-status-probe",
Revision = "v1",
IsEnterprise = true,
Duration = "30",
Weightage = 10,
EnableDataCollection = false,
Conditions = new[]
{
"onChaosStart",
"duringChaos",
"afterChaos",
},
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecProbeValueArgs
{
Name = "TARGET_NAMESPACE",
Value = "<+input>",
},
},
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecProbeArgs
{
Identity = "http-health-check",
Name = "http-health-probe",
Revision = "v1",
IsEnterprise = true,
Duration = "30",
Weightage = 10,
EnableDataCollection = false,
Conditions = new[]
{
"duringChaos",
"afterChaos",
},
Values = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecProbeValueArgs
{
Name = "URL",
Value = "<+input>",
},
},
},
},
Vertices = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "action-stage",
Start = new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartArgs
{
Actions = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartActionArgs
{
Name = "start-notification",
},
},
},
End = null,
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "fault-stage",
Start = new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartArgs
{
Faults = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartFaultArgs
{
Name = "pod-delete-fault",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartFaultArgs
{
Name = "network-latency-fault",
},
},
Probes = new[]
{
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartProbeArgs
{
Name = "pod-status-probe",
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexStartProbeArgs
{
Name = "http-health-probe",
},
},
},
End = null,
},
new Harness.Chaos.Inputs.ExperimentTemplateSpecVertexArgs
{
Name = "cleanup-stage",
Start = null,
End = null,
},
},
CleanupPolicy = "delete",
StatusCheckTimeouts = new Harness.Chaos.Inputs.ExperimentTemplateSpecStatusCheckTimeoutsArgs
{
Delay = 5,
Timeout = 300,
},
},
}, new CustomResourceOptions
{
DependsOn =
{
projectLevel,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.chaos.ExperimentTemplate;
import com.pulumi.harness.chaos.ExperimentTemplateArgs;
import com.pulumi.harness.chaos.inputs.ExperimentTemplateSpecArgs;
import com.pulumi.harness.chaos.inputs.ExperimentTemplateSpecStatusCheckTimeoutsArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
// ============================================================================
// Harness Chaos Experiment Template Resource Examples
// ============================================================================
//
// Experiment templates define complete chaos experiments with actions, faults, and probes.
// These examples are based on TESTED configurations from the e2e-test suite.
//
// Key Points:
// - Templates combine actions, faults, and probes into workflows
// - Vertices define execution order (workflow graph)
// - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
// - Enterprise features: is_enterprise = true
// ============================================================================
// ----------------------------------------------------------------------------
// Example 1: Simple Fault Template (TESTED ✅)
// ----------------------------------------------------------------------------
// Basic template with single fault
var simpleFault = new ExperimentTemplate("simpleFault", ExperimentTemplateArgs.builder()
.orgId(this_.id())
.projectId(thisHarnessPlatformProject.id())
.hubIdentity(projectLevel.identity())
.identity("simple-pod-delete")
.name("Simple Pod Delete Experiment")
.description("Basic experiment with single pod delete fault")
.tags(
"kubernetes",
"pod-delete",
"simple")
.spec(ExperimentTemplateSpecArgs.builder()
.infraType("KubernetesV2")
.faults(ExperimentTemplateSpecFaultArgs.builder()
.identity("pod-delete")
.name("pod-delete-fault")
.revision("v1")
.isEnterprise(true)
.authEnabled(false)
.values(
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_KIND")
.value("deployment")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_NAMESPACE")
.value("<+input>.default('default')")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TOTAL_CHAOS_DURATION")
.value("<+input>.default('30s')")
.build())
.build())
.vertices(ExperimentTemplateSpecVertexArgs.builder()
.name("pod-delete-vertex")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.faults(ExperimentTemplateSpecVertexStartFaultArgs.builder()
.name("pod-delete-fault")
.build())
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build())
.cleanupPolicy("delete")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(projectLevel)
.build());
// ----------------------------------------------------------------------------
// Example 2: Template with Action and Fault (TESTED ✅)
// ----------------------------------------------------------------------------
// Template combining action and fault
var withAction = new ExperimentTemplate("withAction", ExperimentTemplateArgs.builder()
.orgId(this_.id())
.projectId(thisHarnessPlatformProject.id())
.hubIdentity(projectLevel.identity())
.identity("action-and-fault")
.name("Action and Fault Experiment")
.description("Experiment with action before fault")
.tags(
"kubernetes",
"action",
"fault")
.spec(ExperimentTemplateSpecArgs.builder()
.infraType("KubernetesV2")
.actions(ExperimentTemplateSpecActionArgs.builder()
.identity("notification-action")
.name("pre-chaos-notification")
.isEnterprise(false)
.continueOnCompletion(false)
.values(ExperimentTemplateSpecActionValueArgs.builder()
.name("MESSAGE")
.value("Starting chaos experiment")
.build())
.build())
.faults(ExperimentTemplateSpecFaultArgs.builder()
.identity("container-kill")
.name("container-kill-fault")
.revision("v1")
.isEnterprise(true)
.authEnabled(false)
.values(
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_KIND")
.value("deployment")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_NAMESPACE")
.value("<+input>")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TOTAL_CHAOS_DURATION")
.value("<+input>.default('30s')")
.build())
.build())
.vertices(
ExperimentTemplateSpecVertexArgs.builder()
.name("action-vertex")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.actions(ExperimentTemplateSpecVertexStartActionArgs.builder()
.name("pre-chaos-notification")
.build())
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build(),
ExperimentTemplateSpecVertexArgs.builder()
.name("fault-vertex")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.faults(ExperimentTemplateSpecVertexStartFaultArgs.builder()
.name("container-kill-fault")
.build())
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build())
.cleanupPolicy("delete")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(projectLevel)
.build());
// ----------------------------------------------------------------------------
// Example 3: Complex Template with Probes (TESTED ✅)
// ----------------------------------------------------------------------------
// Complete template with actions, faults, and probes
var complex = new ExperimentTemplate("complex", ExperimentTemplateArgs.builder()
.orgId(this_.id())
.projectId(thisHarnessPlatformProject.id())
.hubIdentity(projectLevel.identity())
.identity("complex-experiment")
.name("Complex Chaos Experiment")
.description("Complete experiment with actions, faults, and probes")
.tags(
"kubernetes",
"complex",
"enterprise")
.spec(ExperimentTemplateSpecArgs.builder()
.infraType("KubernetesV2")
.actions(ExperimentTemplateSpecActionArgs.builder()
.identity("notification-action")
.name("start-notification")
.isEnterprise(false)
.continueOnCompletion(false)
.values(ExperimentTemplateSpecActionValueArgs.builder()
.name("MESSAGE")
.value("Chaos experiment started")
.build())
.build())
.faults(
ExperimentTemplateSpecFaultArgs.builder()
.identity("pod-delete")
.name("pod-delete-fault")
.revision("v1")
.isEnterprise(true)
.authEnabled(false)
.values(
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_KIND")
.value("deployment")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_NAMESPACE")
.value("<+input>")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TOTAL_CHAOS_DURATION")
.value("<+input>.default('30s')")
.build())
.build(),
ExperimentTemplateSpecFaultArgs.builder()
.identity("pod-network-latency")
.name("network-latency-fault")
.revision("v1")
.isEnterprise(true)
.authEnabled(false)
.values(
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_KIND")
.value("deployment")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("TARGET_WORKLOAD_NAMESPACE")
.value("<+input>")
.build(),
ExperimentTemplateSpecFaultValueArgs.builder()
.name("NETWORK_LATENCY")
.value("<+input>.default('2000')")
.build())
.build())
.probes(
ExperimentTemplateSpecProbeArgs.builder()
.identity("pod-status-check")
.name("pod-status-probe")
.revision("v1")
.isEnterprise(true)
.duration("30")
.weightage(10)
.enableDataCollection(false)
.conditions(
"onChaosStart",
"duringChaos",
"afterChaos")
.values(ExperimentTemplateSpecProbeValueArgs.builder()
.name("TARGET_NAMESPACE")
.value("<+input>")
.build())
.build(),
ExperimentTemplateSpecProbeArgs.builder()
.identity("http-health-check")
.name("http-health-probe")
.revision("v1")
.isEnterprise(true)
.duration("30")
.weightage(10)
.enableDataCollection(false)
.conditions(
"duringChaos",
"afterChaos")
.values(ExperimentTemplateSpecProbeValueArgs.builder()
.name("URL")
.value("<+input>")
.build())
.build())
.vertices(
ExperimentTemplateSpecVertexArgs.builder()
.name("action-stage")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.actions(ExperimentTemplateSpecVertexStartActionArgs.builder()
.name("start-notification")
.build())
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build(),
ExperimentTemplateSpecVertexArgs.builder()
.name("fault-stage")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.faults(
ExperimentTemplateSpecVertexStartFaultArgs.builder()
.name("pod-delete-fault")
.build(),
ExperimentTemplateSpecVertexStartFaultArgs.builder()
.name("network-latency-fault")
.build())
.probes(
ExperimentTemplateSpecVertexStartProbeArgs.builder()
.name("pod-status-probe")
.build(),
ExperimentTemplateSpecVertexStartProbeArgs.builder()
.name("http-health-probe")
.build())
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build(),
ExperimentTemplateSpecVertexArgs.builder()
.name("cleanup-stage")
.start(ExperimentTemplateSpecVertexStartArgs.builder()
.build())
.end(ExperimentTemplateSpecVertexEndArgs.builder()
.build())
.build())
.cleanupPolicy("delete")
.statusCheckTimeouts(ExperimentTemplateSpecStatusCheckTimeoutsArgs.builder()
.delay(5)
.timeout(300)
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(projectLevel)
.build());
}
}
resources:
# ============================================================================
# Harness Chaos Experiment Template Resource Examples
# ============================================================================
#
# Experiment templates define complete chaos experiments with actions, faults, and probes.
# These examples are based on TESTED configurations from the e2e-test suite.
#
# Key Points:
# - Templates combine actions, faults, and probes into workflows
# - Vertices define execution order (workflow graph)
# - Runtime inputs supported: "<+input>" or "<+input>.default('value')"
# - Enterprise features: is_enterprise = true
# ============================================================================
# ----------------------------------------------------------------------------
# Example 1: Simple Fault Template (TESTED ✅)
# ----------------------------------------------------------------------------
# Basic template with single fault
simpleFault:
type: harness:chaos:ExperimentTemplate
name: simple_fault
properties:
orgId: ${this.id}
projectId: ${thisHarnessPlatformProject.id}
hubIdentity: ${projectLevel.identity}
identity: simple-pod-delete
name: Simple Pod Delete Experiment
description: Basic experiment with single pod delete fault
tags:
- kubernetes
- pod-delete
- simple
spec:
infraType: KubernetesV2
faults:
- identity: pod-delete
name: pod-delete-fault
revision: v1
isEnterprise: true
authEnabled: false
values:
- name: TARGET_WORKLOAD_KIND
value: deployment
- name: TARGET_WORKLOAD_NAMESPACE
value: <+input>.default('default')
- name: TOTAL_CHAOS_DURATION
value: <+input>.default('30s')
vertices:
- name: pod-delete-vertex
start:
faults:
- name: pod-delete-fault
end: {}
cleanupPolicy: delete
options:
dependsOn:
- ${projectLevel}
# ----------------------------------------------------------------------------
# Example 2: Template with Action and Fault (TESTED ✅)
# ----------------------------------------------------------------------------
# Template combining action and fault
withAction:
type: harness:chaos:ExperimentTemplate
name: with_action
properties:
orgId: ${this.id}
projectId: ${thisHarnessPlatformProject.id}
hubIdentity: ${projectLevel.identity}
identity: action-and-fault
name: Action and Fault Experiment
description: Experiment with action before fault
tags:
- kubernetes
- action
- fault
spec:
infraType: KubernetesV2
actions:
- identity: notification-action
name: pre-chaos-notification
isEnterprise: false
continueOnCompletion: false
values:
- name: MESSAGE
value: Starting chaos experiment
faults:
- identity: container-kill
name: container-kill-fault
revision: v1
isEnterprise: true
authEnabled: false
values:
- name: TARGET_WORKLOAD_KIND
value: deployment
- name: TARGET_WORKLOAD_NAMESPACE
value: <+input>
- name: TOTAL_CHAOS_DURATION
value: <+input>.default('30s')
vertices:
- name: action-vertex
start:
actions:
- name: pre-chaos-notification
end: {}
- name: fault-vertex
start:
faults:
- name: container-kill-fault
end: {}
cleanupPolicy: delete
options:
dependsOn:
- ${projectLevel}
# ----------------------------------------------------------------------------
# Example 3: Complex Template with Probes (TESTED ✅)
# ----------------------------------------------------------------------------
# Complete template with actions, faults, and probes
complex:
type: harness:chaos:ExperimentTemplate
properties:
orgId: ${this.id}
projectId: ${thisHarnessPlatformProject.id}
hubIdentity: ${projectLevel.identity}
identity: complex-experiment
name: Complex Chaos Experiment
description: Complete experiment with actions, faults, and probes
tags:
- kubernetes
- complex
- enterprise
spec:
infraType: KubernetesV2
actions:
- identity: notification-action
name: start-notification
isEnterprise: false
continueOnCompletion: false
values:
- name: MESSAGE
value: Chaos experiment started
faults:
- identity: pod-delete
name: pod-delete-fault
revision: v1
isEnterprise: true
authEnabled: false
values:
- name: TARGET_WORKLOAD_KIND
value: deployment
- name: TARGET_WORKLOAD_NAMESPACE
value: <+input>
- name: TOTAL_CHAOS_DURATION
value: <+input>.default('30s')
- identity: pod-network-latency
name: network-latency-fault
revision: v1
isEnterprise: true
authEnabled: false
values:
- name: TARGET_WORKLOAD_KIND
value: deployment
- name: TARGET_WORKLOAD_NAMESPACE
value: <+input>
- name: NETWORK_LATENCY
value: <+input>.default('2000')
probes:
- identity: pod-status-check
name: pod-status-probe
revision: v1
isEnterprise: true
duration: 30
weightage: 10
enableDataCollection: false
conditions:
- onChaosStart
- duringChaos
- afterChaos
values:
- name: TARGET_NAMESPACE
value: <+input>
- identity: http-health-check
name: http-health-probe
revision: v1
isEnterprise: true
duration: 30
weightage: 10
enableDataCollection: false
conditions:
- duringChaos
- afterChaos
values:
- name: URL
value: <+input>
vertices:
- name: action-stage
start:
actions:
- name: start-notification
end: {}
- name: fault-stage
start:
faults:
- name: pod-delete-fault
- name: network-latency-fault
probes:
- name: pod-status-probe
- name: http-health-probe
end: {}
- name: cleanup-stage
start: {}
end: {}
cleanupPolicy: delete
statusCheckTimeouts:
delay: 5
timeout: 300
options:
dependsOn:
- ${projectLevel}
Create ExperimentTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ExperimentTemplate(name: string, args: ExperimentTemplateArgs, opts?: CustomResourceOptions);@overload
def ExperimentTemplate(resource_name: str,
args: ExperimentTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ExperimentTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
hub_identity: Optional[str] = None,
identity: Optional[str] = None,
spec: Optional[ExperimentTemplateSpecArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewExperimentTemplate(ctx *Context, name string, args ExperimentTemplateArgs, opts ...ResourceOption) (*ExperimentTemplate, error)public ExperimentTemplate(string name, ExperimentTemplateArgs args, CustomResourceOptions? opts = null)
public ExperimentTemplate(String name, ExperimentTemplateArgs args)
public ExperimentTemplate(String name, ExperimentTemplateArgs args, CustomResourceOptions options)
type: harness:chaos:ExperimentTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ExperimentTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ExperimentTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ExperimentTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ExperimentTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ExperimentTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ExperimentTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ExperimentTemplate resource accepts the following input properties:
- Hub
Identity string - Hub identifier where the template is stored
- Identity string
- Unique identifier for the experiment template
- Spec
Experiment
Template Spec - Specification of the experiment template
- Description string
- Description of the experiment template
- Name string
- Name of the experiment template
- Org
Id string - Organization identifier
- Project
Id string - Project identifier
- List<string>
- Tags associated with the experiment template
- Hub
Identity string - Hub identifier where the template is stored
- Identity string
- Unique identifier for the experiment template
- Spec
Experiment
Template Spec Args - Specification of the experiment template
- Description string
- Description of the experiment template
- Name string
- Name of the experiment template
- Org
Id string - Organization identifier
- Project
Id string - Project identifier
- []string
- Tags associated with the experiment template
- hub
Identity String - Hub identifier where the template is stored
- identity String
- Unique identifier for the experiment template
- spec
Experiment
Template Spec - Specification of the experiment template
- description String
- Description of the experiment template
- name String
- Name of the experiment template
- org
Id String - Organization identifier
- project
Id String - Project identifier
- List<String>
- Tags associated with the experiment template
- hub
Identity string - Hub identifier where the template is stored
- identity string
- Unique identifier for the experiment template
- spec
Experiment
Template Spec - Specification of the experiment template
- description string
- Description of the experiment template
- name string
- Name of the experiment template
- org
Id string - Organization identifier
- project
Id string - Project identifier
- string[]
- Tags associated with the experiment template
- hub_
identity str - Hub identifier where the template is stored
- identity str
- Unique identifier for the experiment template
- spec
Experiment
Template Spec Args - Specification of the experiment template
- description str
- Description of the experiment template
- name str
- Name of the experiment template
- org_
id str - Organization identifier
- project_
id str - Project identifier
- Sequence[str]
- Tags associated with the experiment template
- hub
Identity String - Hub identifier where the template is stored
- identity String
- Unique identifier for the experiment template
- spec Property Map
- Specification of the experiment template
- description String
- Description of the experiment template
- name String
- Name of the experiment template
- org
Id String - Organization identifier
- project
Id String - Project identifier
- List<String>
- Tags associated with the experiment template
Outputs
All input properties are implicitly available as output properties. Additionally, the ExperimentTemplate resource produces the following output properties:
- Api
Version string - API version of the experiment template
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether this is a default template
- Kind string
- Kind of the experiment template
- Revision string
- Revision of the experiment template
- Api
Version string - API version of the experiment template
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether this is a default template
- Kind string
- Kind of the experiment template
- Revision string
- Revision of the experiment template
- api
Version String - API version of the experiment template
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether this is a default template
- kind String
- Kind of the experiment template
- revision String
- Revision of the experiment template
- api
Version string - API version of the experiment template
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - Whether this is a default template
- kind string
- Kind of the experiment template
- revision string
- Revision of the experiment template
- api_
version str - API version of the experiment template
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Whether this is a default template
- kind str
- Kind of the experiment template
- revision str
- Revision of the experiment template
- api
Version String - API version of the experiment template
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether this is a default template
- kind String
- Kind of the experiment template
- revision String
- Revision of the experiment template
Look up Existing ExperimentTemplate Resource
Get an existing ExperimentTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ExperimentTemplateState, opts?: CustomResourceOptions): ExperimentTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_version: Optional[str] = None,
description: Optional[str] = None,
hub_identity: Optional[str] = None,
identity: Optional[str] = None,
is_default: Optional[bool] = None,
kind: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
revision: Optional[str] = None,
spec: Optional[ExperimentTemplateSpecArgs] = None,
tags: Optional[Sequence[str]] = None) -> ExperimentTemplatefunc GetExperimentTemplate(ctx *Context, name string, id IDInput, state *ExperimentTemplateState, opts ...ResourceOption) (*ExperimentTemplate, error)public static ExperimentTemplate Get(string name, Input<string> id, ExperimentTemplateState? state, CustomResourceOptions? opts = null)public static ExperimentTemplate get(String name, Output<String> id, ExperimentTemplateState state, CustomResourceOptions options)resources: _: type: harness:chaos:ExperimentTemplate get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Version string - API version of the experiment template
- Description string
- Description of the experiment template
- Hub
Identity string - Hub identifier where the template is stored
- Identity string
- Unique identifier for the experiment template
- Is
Default bool - Whether this is a default template
- Kind string
- Kind of the experiment template
- Name string
- Name of the experiment template
- Org
Id string - Organization identifier
- Project
Id string - Project identifier
- Revision string
- Revision of the experiment template
- Spec
Experiment
Template Spec - Specification of the experiment template
- List<string>
- Tags associated with the experiment template
- Api
Version string - API version of the experiment template
- Description string
- Description of the experiment template
- Hub
Identity string - Hub identifier where the template is stored
- Identity string
- Unique identifier for the experiment template
- Is
Default bool - Whether this is a default template
- Kind string
- Kind of the experiment template
- Name string
- Name of the experiment template
- Org
Id string - Organization identifier
- Project
Id string - Project identifier
- Revision string
- Revision of the experiment template
- Spec
Experiment
Template Spec Args - Specification of the experiment template
- []string
- Tags associated with the experiment template
- api
Version String - API version of the experiment template
- description String
- Description of the experiment template
- hub
Identity String - Hub identifier where the template is stored
- identity String
- Unique identifier for the experiment template
- is
Default Boolean - Whether this is a default template
- kind String
- Kind of the experiment template
- name String
- Name of the experiment template
- org
Id String - Organization identifier
- project
Id String - Project identifier
- revision String
- Revision of the experiment template
- spec
Experiment
Template Spec - Specification of the experiment template
- List<String>
- Tags associated with the experiment template
- api
Version string - API version of the experiment template
- description string
- Description of the experiment template
- hub
Identity string - Hub identifier where the template is stored
- identity string
- Unique identifier for the experiment template
- is
Default boolean - Whether this is a default template
- kind string
- Kind of the experiment template
- name string
- Name of the experiment template
- org
Id string - Organization identifier
- project
Id string - Project identifier
- revision string
- Revision of the experiment template
- spec
Experiment
Template Spec - Specification of the experiment template
- string[]
- Tags associated with the experiment template
- api_
version str - API version of the experiment template
- description str
- Description of the experiment template
- hub_
identity str - Hub identifier where the template is stored
- identity str
- Unique identifier for the experiment template
- is_
default bool - Whether this is a default template
- kind str
- Kind of the experiment template
- name str
- Name of the experiment template
- org_
id str - Organization identifier
- project_
id str - Project identifier
- revision str
- Revision of the experiment template
- spec
Experiment
Template Spec Args - Specification of the experiment template
- Sequence[str]
- Tags associated with the experiment template
- api
Version String - API version of the experiment template
- description String
- Description of the experiment template
- hub
Identity String - Hub identifier where the template is stored
- identity String
- Unique identifier for the experiment template
- is
Default Boolean - Whether this is a default template
- kind String
- Kind of the experiment template
- name String
- Name of the experiment template
- org
Id String - Organization identifier
- project
Id String - Project identifier
- revision String
- Revision of the experiment template
- spec Property Map
- Specification of the experiment template
- List<String>
- Tags associated with the experiment template
Supporting Types
ExperimentTemplateSpec, ExperimentTemplateSpecArgs
- Infra
Type string - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- Actions
List<Experiment
Template Spec Action> - List of actions in the experiment
- Cleanup
Policy string - Cleanup policy for experiment resources (retain, delete)
- Faults
List<Experiment
Template Spec Fault> - List of faults in the experiment
- Infra
Id string - Infrastructure identifier (supports runtime input: <+input>)
- Probes
List<Experiment
Template Spec Probe> - List of probes in the experiment
- Status
Check ExperimentTimeouts Template Spec Status Check Timeouts - Status check timeout configuration
- Vertices
List<Experiment
Template Spec Vertex> - Workflow graph vertices defining execution order
- Infra
Type string - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- Actions
[]Experiment
Template Spec Action - List of actions in the experiment
- Cleanup
Policy string - Cleanup policy for experiment resources (retain, delete)
- Faults
[]Experiment
Template Spec Fault - List of faults in the experiment
- Infra
Id string - Infrastructure identifier (supports runtime input: <+input>)
- Probes
[]Experiment
Template Spec Probe - List of probes in the experiment
- Status
Check ExperimentTimeouts Template Spec Status Check Timeouts - Status check timeout configuration
- Vertices
[]Experiment
Template Spec Vertex - Workflow graph vertices defining execution order
- infra
Type String - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- actions
List<Experiment
Template Spec Action> - List of actions in the experiment
- cleanup
Policy String - Cleanup policy for experiment resources (retain, delete)
- faults
List<Experiment
Template Spec Fault> - List of faults in the experiment
- infra
Id String - Infrastructure identifier (supports runtime input: <+input>)
- probes
List<Experiment
Template Spec Probe> - List of probes in the experiment
- status
Check ExperimentTimeouts Template Spec Status Check Timeouts - Status check timeout configuration
- vertices
List<Experiment
Template Spec Vertex> - Workflow graph vertices defining execution order
- infra
Type string - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- actions
Experiment
Template Spec Action[] - List of actions in the experiment
- cleanup
Policy string - Cleanup policy for experiment resources (retain, delete)
- faults
Experiment
Template Spec Fault[] - List of faults in the experiment
- infra
Id string - Infrastructure identifier (supports runtime input: <+input>)
- probes
Experiment
Template Spec Probe[] - List of probes in the experiment
- status
Check ExperimentTimeouts Template Spec Status Check Timeouts - Status check timeout configuration
- vertices
Experiment
Template Spec Vertex[] - Workflow graph vertices defining execution order
- infra_
type str - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- actions
Sequence[Experiment
Template Spec Action] - List of actions in the experiment
- cleanup_
policy str - Cleanup policy for experiment resources (retain, delete)
- faults
Sequence[Experiment
Template Spec Fault] - List of faults in the experiment
- infra_
id str - Infrastructure identifier (supports runtime input: <+input>)
- probes
Sequence[Experiment
Template Spec Probe] - List of probes in the experiment
- status_
check_ Experimenttimeouts Template Spec Status Check Timeouts - Status check timeout configuration
- vertices
Sequence[Experiment
Template Spec Vertex] - Workflow graph vertices defining execution order
- infra
Type String - Infrastructure type (Windows, Linux, CloudFoundry, Container, Kubernetes, KubernetesV2)
- actions List<Property Map>
- List of actions in the experiment
- cleanup
Policy String - Cleanup policy for experiment resources (retain, delete)
- faults List<Property Map>
- List of faults in the experiment
- infra
Id String - Infrastructure identifier (supports runtime input: <+input>)
- probes List<Property Map>
- List of probes in the experiment
- status
Check Property MapTimeouts - Status check timeout configuration
- vertices List<Property Map>
- Workflow graph vertices defining execution order
ExperimentTemplateSpecAction, ExperimentTemplateSpecActionArgs
- Identity string
- Action template identity
- Name string
- Action name
- Continue
On boolCompletion - Whether to continue on completion
- Infra
Id string - Infrastructure identifier for this action
- Is
Enterprise bool - Whether this is an enterprise action
- Revision int
- Action template revision
- Values
List<Experiment
Template Spec Action Value> - Variable values for the action
- Identity string
- Action template identity
- Name string
- Action name
- Continue
On boolCompletion - Whether to continue on completion
- Infra
Id string - Infrastructure identifier for this action
- Is
Enterprise bool - Whether this is an enterprise action
- Revision int
- Action template revision
- Values
[]Experiment
Template Spec Action Value - Variable values for the action
- identity String
- Action template identity
- name String
- Action name
- continue
On BooleanCompletion - Whether to continue on completion
- infra
Id String - Infrastructure identifier for this action
- is
Enterprise Boolean - Whether this is an enterprise action
- revision Integer
- Action template revision
- values
List<Experiment
Template Spec Action Value> - Variable values for the action
- identity string
- Action template identity
- name string
- Action name
- continue
On booleanCompletion - Whether to continue on completion
- infra
Id string - Infrastructure identifier for this action
- is
Enterprise boolean - Whether this is an enterprise action
- revision number
- Action template revision
- values
Experiment
Template Spec Action Value[] - Variable values for the action
- identity str
- Action template identity
- name str
- Action name
- continue_
on_ boolcompletion - Whether to continue on completion
- infra_
id str - Infrastructure identifier for this action
- is_
enterprise bool - Whether this is an enterprise action
- revision int
- Action template revision
- values
Sequence[Experiment
Template Spec Action Value] - Variable values for the action
- identity String
- Action template identity
- name String
- Action name
- continue
On BooleanCompletion - Whether to continue on completion
- infra
Id String - Infrastructure identifier for this action
- is
Enterprise Boolean - Whether this is an enterprise action
- revision Number
- Action template revision
- values List<Property Map>
- Variable values for the action
ExperimentTemplateSpecActionValue, ExperimentTemplateSpecActionValueArgs
ExperimentTemplateSpecFault, ExperimentTemplateSpecFaultArgs
- Identity string
- Fault template identity
- Name string
- Fault name
- Auth
Enabled bool - Whether authentication is enabled
- Infra
Id string - Infrastructure identifier for this fault
- Is
Enterprise bool - Whether this is an enterprise fault
- Revision string
- Fault template revision
- Values
List<Experiment
Template Spec Fault Value> - Variable values for the fault
- Identity string
- Fault template identity
- Name string
- Fault name
- Auth
Enabled bool - Whether authentication is enabled
- Infra
Id string - Infrastructure identifier for this fault
- Is
Enterprise bool - Whether this is an enterprise fault
- Revision string
- Fault template revision
- Values
[]Experiment
Template Spec Fault Value - Variable values for the fault
- identity String
- Fault template identity
- name String
- Fault name
- auth
Enabled Boolean - Whether authentication is enabled
- infra
Id String - Infrastructure identifier for this fault
- is
Enterprise Boolean - Whether this is an enterprise fault
- revision String
- Fault template revision
- values
List<Experiment
Template Spec Fault Value> - Variable values for the fault
- identity string
- Fault template identity
- name string
- Fault name
- auth
Enabled boolean - Whether authentication is enabled
- infra
Id string - Infrastructure identifier for this fault
- is
Enterprise boolean - Whether this is an enterprise fault
- revision string
- Fault template revision
- values
Experiment
Template Spec Fault Value[] - Variable values for the fault
- identity str
- Fault template identity
- name str
- Fault name
- auth_
enabled bool - Whether authentication is enabled
- infra_
id str - Infrastructure identifier for this fault
- is_
enterprise bool - Whether this is an enterprise fault
- revision str
- Fault template revision
- values
Sequence[Experiment
Template Spec Fault Value] - Variable values for the fault
- identity String
- Fault template identity
- name String
- Fault name
- auth
Enabled Boolean - Whether authentication is enabled
- infra
Id String - Infrastructure identifier for this fault
- is
Enterprise Boolean - Whether this is an enterprise fault
- revision String
- Fault template revision
- values List<Property Map>
- Variable values for the fault
ExperimentTemplateSpecFaultValue, ExperimentTemplateSpecFaultValueArgs
ExperimentTemplateSpecProbe, ExperimentTemplateSpecProbeArgs
- Identity string
- Probe template identity
- Name string
- Probe name
- Conditions
List<Experiment
Template Spec Probe Condition> - Probe execution conditions
- Duration string
- Probe duration
- Enable
Data boolCollection - Whether to enable data collection
- Infra
Id string - Infrastructure identifier for this probe
- Is
Enterprise bool - Whether this is an enterprise probe
- Revision int
- Probe template revision
- Values
List<Experiment
Template Spec Probe Value> - Variable values for the probe
- Weightage int
- Probe weightage for resilience score calculation
- Identity string
- Probe template identity
- Name string
- Probe name
- Conditions
[]Experiment
Template Spec Probe Condition - Probe execution conditions
- Duration string
- Probe duration
- Enable
Data boolCollection - Whether to enable data collection
- Infra
Id string - Infrastructure identifier for this probe
- Is
Enterprise bool - Whether this is an enterprise probe
- Revision int
- Probe template revision
- Values
[]Experiment
Template Spec Probe Value - Variable values for the probe
- Weightage int
- Probe weightage for resilience score calculation
- identity String
- Probe template identity
- name String
- Probe name
- conditions
List<Experiment
Template Spec Probe Condition> - Probe execution conditions
- duration String
- Probe duration
- enable
Data BooleanCollection - Whether to enable data collection
- infra
Id String - Infrastructure identifier for this probe
- is
Enterprise Boolean - Whether this is an enterprise probe
- revision Integer
- Probe template revision
- values
List<Experiment
Template Spec Probe Value> - Variable values for the probe
- weightage Integer
- Probe weightage for resilience score calculation
- identity string
- Probe template identity
- name string
- Probe name
- conditions
Experiment
Template Spec Probe Condition[] - Probe execution conditions
- duration string
- Probe duration
- enable
Data booleanCollection - Whether to enable data collection
- infra
Id string - Infrastructure identifier for this probe
- is
Enterprise boolean - Whether this is an enterprise probe
- revision number
- Probe template revision
- values
Experiment
Template Spec Probe Value[] - Variable values for the probe
- weightage number
- Probe weightage for resilience score calculation
- identity str
- Probe template identity
- name str
- Probe name
- conditions
Sequence[Experiment
Template Spec Probe Condition] - Probe execution conditions
- duration str
- Probe duration
- enable_
data_ boolcollection - Whether to enable data collection
- infra_
id str - Infrastructure identifier for this probe
- is_
enterprise bool - Whether this is an enterprise probe
- revision int
- Probe template revision
- values
Sequence[Experiment
Template Spec Probe Value] - Variable values for the probe
- weightage int
- Probe weightage for resilience score calculation
- identity String
- Probe template identity
- name String
- Probe name
- conditions List<Property Map>
- Probe execution conditions
- duration String
- Probe duration
- enable
Data BooleanCollection - Whether to enable data collection
- infra
Id String - Infrastructure identifier for this probe
- is
Enterprise Boolean - Whether this is an enterprise probe
- revision Number
- Probe template revision
- values List<Property Map>
- Variable values for the probe
- weightage Number
- Probe weightage for resilience score calculation
ExperimentTemplateSpecProbeCondition, ExperimentTemplateSpecProbeConditionArgs
- Execute
Upon string - When to execute the probe (onChaosStart, duringChaos, afterChaos)
- Execute
Upon string - When to execute the probe (onChaosStart, duringChaos, afterChaos)
- execute
Upon String - When to execute the probe (onChaosStart, duringChaos, afterChaos)
- execute
Upon string - When to execute the probe (onChaosStart, duringChaos, afterChaos)
- execute_
upon str - When to execute the probe (onChaosStart, duringChaos, afterChaos)
- execute
Upon String - When to execute the probe (onChaosStart, duringChaos, afterChaos)
ExperimentTemplateSpecProbeValue, ExperimentTemplateSpecProbeValueArgs
ExperimentTemplateSpecStatusCheckTimeouts, ExperimentTemplateSpecStatusCheckTimeoutsArgs
ExperimentTemplateSpecVertex, ExperimentTemplateSpecVertexArgs
- Name string
- Vertex name
- End
Experiment
Template Spec Vertex End - End configuration for the vertex
- Start
Experiment
Template Spec Vertex Start - Start configuration for the vertex
- Name string
- Vertex name
- End
Experiment
Template Spec Vertex End - End configuration for the vertex
- Start
Experiment
Template Spec Vertex Start - Start configuration for the vertex
- name String
- Vertex name
- end
Experiment
Template Spec Vertex End - End configuration for the vertex
- start
Experiment
Template Spec Vertex Start - Start configuration for the vertex
- name string
- Vertex name
- end
Experiment
Template Spec Vertex End - End configuration for the vertex
- start
Experiment
Template Spec Vertex Start - Start configuration for the vertex
- name str
- Vertex name
- end
Experiment
Template Spec Vertex End - End configuration for the vertex
- start
Experiment
Template Spec Vertex Start - Start configuration for the vertex
- name String
- Vertex name
- end Property Map
- End configuration for the vertex
- start Property Map
- Start configuration for the vertex
ExperimentTemplateSpecVertexEnd, ExperimentTemplateSpecVertexEndArgs
- Actions
List<Experiment
Template Spec Vertex End Action> - Actions to execute at end
- Faults
List<Experiment
Template Spec Vertex End Fault> - Faults to execute at end
- Probes
List<Experiment
Template Spec Vertex End Probe> - Probes to execute at end
- Actions
[]Experiment
Template Spec Vertex End Action - Actions to execute at end
- Faults
[]Experiment
Template Spec Vertex End Fault - Faults to execute at end
- Probes
[]Experiment
Template Spec Vertex End Probe - Probes to execute at end
- actions
List<Experiment
Template Spec Vertex End Action> - Actions to execute at end
- faults
List<Experiment
Template Spec Vertex End Fault> - Faults to execute at end
- probes
List<Experiment
Template Spec Vertex End Probe> - Probes to execute at end
- actions
Experiment
Template Spec Vertex End Action[] - Actions to execute at end
- faults
Experiment
Template Spec Vertex End Fault[] - Faults to execute at end
- probes
Experiment
Template Spec Vertex End Probe[] - Probes to execute at end
- actions
Sequence[Experiment
Template Spec Vertex End Action] - Actions to execute at end
- faults
Sequence[Experiment
Template Spec Vertex End Fault] - Faults to execute at end
- probes
Sequence[Experiment
Template Spec Vertex End Probe] - Probes to execute at end
- actions List<Property Map>
- Actions to execute at end
- faults List<Property Map>
- Faults to execute at end
- probes List<Property Map>
- Probes to execute at end
ExperimentTemplateSpecVertexEndAction, ExperimentTemplateSpecVertexEndActionArgs
- Name string
- Action name
- Name string
- Action name
- name String
- Action name
- name string
- Action name
- name str
- Action name
- name String
- Action name
ExperimentTemplateSpecVertexEndFault, ExperimentTemplateSpecVertexEndFaultArgs
- Name string
- Fault name
- Name string
- Fault name
- name String
- Fault name
- name string
- Fault name
- name str
- Fault name
- name String
- Fault name
ExperimentTemplateSpecVertexEndProbe, ExperimentTemplateSpecVertexEndProbeArgs
- Name string
- Probe name
- Name string
- Probe name
- name String
- Probe name
- name string
- Probe name
- name str
- Probe name
- name String
- Probe name
ExperimentTemplateSpecVertexStart, ExperimentTemplateSpecVertexStartArgs
- Actions
List<Experiment
Template Spec Vertex Start Action> - Actions to execute at start
- Faults
List<Experiment
Template Spec Vertex Start Fault> - Faults to execute at start
- Probes
List<Experiment
Template Spec Vertex Start Probe> - Probes to execute at start
- Actions
[]Experiment
Template Spec Vertex Start Action - Actions to execute at start
- Faults
[]Experiment
Template Spec Vertex Start Fault - Faults to execute at start
- Probes
[]Experiment
Template Spec Vertex Start Probe - Probes to execute at start
- actions
List<Experiment
Template Spec Vertex Start Action> - Actions to execute at start
- faults
List<Experiment
Template Spec Vertex Start Fault> - Faults to execute at start
- probes
List<Experiment
Template Spec Vertex Start Probe> - Probes to execute at start
- actions
Experiment
Template Spec Vertex Start Action[] - Actions to execute at start
- faults
Experiment
Template Spec Vertex Start Fault[] - Faults to execute at start
- probes
Experiment
Template Spec Vertex Start Probe[] - Probes to execute at start
- actions
Sequence[Experiment
Template Spec Vertex Start Action] - Actions to execute at start
- faults
Sequence[Experiment
Template Spec Vertex Start Fault] - Faults to execute at start
- probes
Sequence[Experiment
Template Spec Vertex Start Probe] - Probes to execute at start
- actions List<Property Map>
- Actions to execute at start
- faults List<Property Map>
- Faults to execute at start
- probes List<Property Map>
- Probes to execute at start
ExperimentTemplateSpecVertexStartAction, ExperimentTemplateSpecVertexStartActionArgs
- Name string
- Action name
- Name string
- Action name
- name String
- Action name
- name string
- Action name
- name str
- Action name
- name String
- Action name
ExperimentTemplateSpecVertexStartFault, ExperimentTemplateSpecVertexStartFaultArgs
- Name string
- Fault name
- Name string
- Fault name
- name String
- Fault name
- name string
- Fault name
- name str
- Fault name
- name String
- Fault name
ExperimentTemplateSpecVertexStartProbe, ExperimentTemplateSpecVertexStartProbeArgs
- Name string
- Probe name
- Name string
- Probe name
- name String
- Probe name
- name string
- Probe name
- name str
- Probe name
- name String
- Probe name
Import
The pulumi import command can be used, for example:
Example 1: Import Project-level Experiment Template Format: org_id/project_id/hub_identity/template_identity
$ pulumi import harness:chaos/experimentTemplate:ExperimentTemplate simple_fault my_org/my_project/my-chaos-hub/simple-pod-delete-experiment
Example 2: Import Org-level Experiment Template Format: org_id/hub_identity/template_identity
$ pulumi import harness:chaos/experimentTemplate:ExperimentTemplate org_level my_org/org-chaos-hub/org-experiment-template
Example 3: Import Account-level Experiment Template Format: hub_identity/template_identity
$ pulumi import harness:chaos/experimentTemplate:ExperimentTemplate account_level account-chaos-hub/account-experiment-template
Example 4: Import Comprehensive Experiment Template
$ pulumi import harness:chaos/experimentTemplate:ExperimentTemplate comprehensive my_org/my_project/my-chaos-hub/comprehensive-experiment
Example 5: Import Multi-Fault Experiment Template
$ pulumi import harness:chaos/experimentTemplate:ExperimentTemplate multi_fault my_org/my_project/my-chaos-hub/multi-fault-experiment
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
published on Tuesday, Apr 21, 2026 by Pulumi
