Skip to content

v0.5.13

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jul 12:55
· 1589 commits to main since this release

Issues | Pull Requests | v0.5.12...v0.5.13 | Base revision

Features

#420 #421 Support setting environment variables in tfaction.yaml and tfaction-root.yaml

You can configure environment variables in the following places.

  1. working directory tfaction.yaml's *_config
  2. working directory tfaction.yaml
  3. tfaction-root.yaml target_groups.*_config
  4. tfaction-root.yaml target_groups
  5. tfaction-root.yaml

Environment variables are set by tfaction's setup action.

e.g.

tfaction.yaml

env: # 2
  FOO: foo
terraform_plan_config:
  env: # 1
    TF_CLI_ARGS_plan: "-parallelism=30"

tfaction-root.yaml

env: # 5
  YOO: yoo
target_groups:
- working_directory: github/
  env: # 4
    BAR: bar
  terraform_plan_config:
    env: # 3
      ZOO: zoo
      TF_CLI_ARGS_plan: "-parallelism=20" # overriden

Environment Variables

TF_CLI_ARGS_plan: "-parallelism=30"
FOO: foo
ZOO: zoo
BAR: bar
YOO: yoo

You can confirm environment variables are set from GitHub Actions Web UI.

image

This feature is especially useful when you want to configure Terraform CLI options per working directory.