Resource: aws_fis_experiment_template

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

resource "aws_fis_experiment_template" "example" {
  description = "example"
  role_arn    = aws_iam_role.example.arn

  stop_condition {
    source = "none"
  }

  action {
    name      = "example-action"
    action_id = "aws:ec2:terminate-instances"

    target {
      key   = "Instances"
      value = "example-target"
    }
  }

  target {
    name           = "example-target"
    resource_type  = "aws:ec2:instance"
    selection_mode = "COUNT(1)"

    resource_tag {
      key   = "env"
      value = "example"
    }
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

action

parameter

For a list of parameters supported by each action, see AWS FIS actions reference.

target (action.*.target)

stop_condition

target

filter

resource_tag

log_configuration

cloudwatch_logs_configuration

s3_configuration

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import FIS Experiment Templates using the id. For example:

import {
  to = aws_fis_experiment_template.template
  id = "EXT123AbCdEfGhIjK"
}

Using terraform import, import FIS Experiment Templates using the id. For example:

% terraform import aws_fis_experiment_template.template EXT123AbCdEfGhIjK