• Docs
  • Features
  • Workflows

Workflows

Workflows can be used to replace the default workflow steps Terrateam executes during an Operation.

Terrateam Runtime Configuration

Terrateam behavior can be configured via a config.yml. This file is located in a directory named .terrateam at the root of your Terraform repository: .terrateam/config.yml.

See Configuration documentation for details.

Configuration

Top-level key: workflows

See Configuration Reference documentation for details.

KeyTypeDescription
tag_queryTag QueryWorkflow configuration for a Tag Query.

Default configuration:

workflows:
  - tag_query: ""
    plan:
      - type: init
      - type: plan
    apply:
      - type: init
      - type: apply

Tag Query

A list of all tags that must be present in a tag set in order to match the workflow. See Tags documentation for Tag Query details.

Each tag_query consists of a map as a value.

The value map has the following attributes:

KeyTypeDescription
planPlanPlan steps.
applyApplyApply steps.
terragruntBooleanOverride the terraform command with terragrunt. Default is false.
terraform_versionBooleanOverride the Terraform version specified in default_tf_version.
Plan

Plan

Plan steps.

KeyTypeDescription
typeStringTerrateam step type: init, plan, env, run.
Extra Arguments

Extra command line arguments passed to the terraform command.

Environment Variables

KeyTypeDescription
nameStringName of environment variable.
cmdListCommand to use to set environment variable.
trim_trailing_newlinesBooleanTrim trailing newlines. Default is true.

Run

KeyTypeDescription
cmdListCommand to run from the directory that Terrateam is operating against.
run_onStringRun the command on step success, failure, or always. Default is success.
capture_outputBooleanWhen capture_output is set to true, command output is included in the GitHub pull request comment on a failure. Sensitive data is not masked. Be aware, this data is sent back to the Terrateam backend for processing. Default is false.
envObjectEnvironment variables to set for this execution. Object keys are environment variable names and the value is a string.
Apply

Apply

Apply steps.

KeyTypeDescription
typeStringTerrateam step type: init, apply, env, run.
Extra Arguments

Extra command line arguments passed to the terraform command.

Environment Variables

KeyTypeDescription
nameStringName of environment variable.
cmdListCommand to use to set environment variable.
trim_trailing_newlinesBooleanTrim trailing newlines. Default is true.

Run

KeyTypeDescription
cmdListCommand to run from the directory that Terrateam is operating against.
run_onStringRun the command on step success, failure, or always. Default is success.
capture_outputBooleanWhen capture_output is set to true, command output is included in the GitHub pull request comment on a failure. Sensitive data is not masked. Be aware, this data is sent back to the Terrateam backend for processing. Default is false.
envObjectEnvironment variables to set for this execution. Object keys are environment variable names and the value is a string.

Use Cases