ExperimentTemplateArgs

data class ExperimentTemplateArgs(val actions: Output<List<ExperimentTemplateActionArgs>>? = null, val description: Output<String>? = null, val roleArn: Output<String>? = null, val stopConditions: Output<List<ExperimentTemplateStopConditionArgs>>? = null, val tags: Output<Map<String, String>>? = null, val targets: Output<List<ExperimentTemplateTargetArgs>>? = null) : ConvertibleToJava<ExperimentTemplateArgs>

Provides an FIS Experiment Template, which can be used to run an experiment. An experiment template contains one or more actions to run on specified targets during an experiment. It also contains the stop conditions that prevent the experiment from going out of bounds. See Amazon Fault Injection Simulator for more information.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.fis.ExperimentTemplate;
import com.pulumi.aws.fis.ExperimentTemplateArgs;
import com.pulumi.aws.fis.inputs.ExperimentTemplateStopConditionArgs;
import com.pulumi.aws.fis.inputs.ExperimentTemplateActionArgs;
import com.pulumi.aws.fis.inputs.ExperimentTemplateActionTargetArgs;
import com.pulumi.aws.fis.inputs.ExperimentTemplateTargetArgs;
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) {
var example = new ExperimentTemplate("example", ExperimentTemplateArgs.builder()
.description("example")
.roleArn(aws_iam_role.example().arn())
.stopConditions(ExperimentTemplateStopConditionArgs.builder()
.source("none")
.build())
.actions(ExperimentTemplateActionArgs.builder()
.name("example-action")
.actionId("aws:ec2:terminate-instances")
.target(ExperimentTemplateActionTargetArgs.builder()
.key("Instances")
.value("example-target")
.build())
.build())
.targets(ExperimentTemplateTargetArgs.builder()
.name("example-target")
.resourceType("aws:ec2:instance")
.selectionMode("COUNT(1)")
.resourceTags(ExperimentTemplateTargetResourceTagArgs.builder()
.key("env")
.value("example")
.build())
.build())
.build());
}
}

Import

FIS Experiment Templates can be imported using the id, e.g.

$ pulumi import aws:fis/experimentTemplate:ExperimentTemplate template EXT123AbCdEfGhIjK

Constructors

Link copied to clipboard
constructor(actions: Output<List<ExperimentTemplateActionArgs>>? = null, description: Output<String>? = null, roleArn: Output<String>? = null, stopConditions: Output<List<ExperimentTemplateStopConditionArgs>>? = null, tags: Output<Map<String, String>>? = null, targets: Output<List<ExperimentTemplateTargetArgs>>? = null)

Properties

Link copied to clipboard

Action to be performed during an experiment. See below.

Link copied to clipboard
val description: Output<String>? = null

Description for the experiment template.

Link copied to clipboard
val roleArn: Output<String>? = null

ARN of an IAM role that grants the AWS FIS service permission to perform service actions on your behalf.

Link copied to clipboard

When an ongoing experiment should be stopped. See below. The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value mapping of tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard

Target of an action. See below.

Functions

Link copied to clipboard
open override fun toJava(): ExperimentTemplateArgs