Terraform Preview Deployment¶
Description¶
This workflow deploys a Terraform configuration to a preview environment.
Inputs¶
name | description | type | required | default |
---|---|---|---|---|
environment |
Environment to deploy |
string |
false |
"" |
aws_region |
AWS region |
string |
false |
"" |
aws_oidc_role_arn |
AWS OIDC IAM role to assume |
string |
false |
"" |
aws_account_id |
The AWS account ID. |
string |
false |
"" |
gh_artifact_path |
Path to download artifacts to. If unset, default action workspace is used. If both 'ghartifactpath' and 'ghartifactname' are unset, artifacts are not downloaded. |
string |
false |
"" |
gh_artifact_name |
Name of the artifact to download. If only 'ghartifactpath' is set, then all artifacts are downloaded. If both 'ghartifactpath' and 'ghartifactname' are unset, artifacts are not downloaded. |
string |
false |
"" |
gh_checkout_ref |
The branch, tag or SHA to checkout. |
string |
false |
"" |
gh_artifact_pattern |
A glob pattern to the artifacts that should be downloaded. Ignored if name is specified. |
string |
false |
"" |
gh_artifact_merge_multiple |
When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. Optional. Default is 'false'. |
boolean |
false |
"" |
tf_dir |
Terraform directory |
string |
false |
"" |
tf_backend_configs |
Terraform backend config cli arguments |
string |
false |
"" |
tf_backend_config_files |
List of Terraform backend config files to use, one per line. Paths should be relative to the GitHub Actions workspace. |
string |
false |
"" |
tf_var_files |
New line separated list of terraform variable files |
string |
false |
"" |
tf_vars |
New line separated list of terraform variables |
string |
false |
"" |
tf_pre_run |
Command to run before Terraform is executed. |
string |
false |
"" |
tf_workspace |
Terraform workspace |
string |
false |
"" |
Outputs¶
name | description |
---|---|
tf_outputs |
List of Terraform outputs captured. |
Usage¶
jobs:
job1:
uses: tx-pts-dai/github-workflows/.github/workflows/tf-feature.yaml@v2
with:
environment:
# Environment to deploy
#
# Type: string
# Required: false
# Default: ""
aws_region:
# AWS region
#
# Type: string
# Required: false
# Default: ""
aws_oidc_role_arn:
# AWS OIDC IAM role to assume
#
# Type: string
# Required: false
# Default: ""
aws_account_id:
# The AWS account ID.
#
# Type: string
# Required: false
# Default: ""
gh_artifact_path:
# Path to download artifacts to. If unset, default action workspace is used. If both 'gh_artifact_path' and 'gh_artifact_name' are unset, artifacts are not downloaded.
#
# Type: string
# Required: false
# Default: ""
gh_artifact_name:
# Name of the artifact to download. If only 'gh_artifact_path' is set, then all artifacts are downloaded. If both 'gh_artifact_path' and 'gh_artifact_name' are unset, artifacts are not downloaded.
#
# Type: string
# Required: false
# Default: ""
gh_checkout_ref:
# The branch, tag or SHA to checkout.
#
# Type: string
# Required: false
# Default: ""
gh_artifact_pattern:
# A glob pattern to the artifacts that should be downloaded. Ignored if name is specified.
#
# Type: string
# Required: false
# Default: ""
gh_artifact_merge_multiple:
# When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path. Optional. Default is 'false'.
#
# Type: boolean
# Required: false
# Default: ""
tf_dir:
# Terraform directory
#
# Type: string
# Required: false
# Default: ""
tf_backend_configs:
# Terraform backend config cli arguments
#
# Type: string
# Required: false
# Default: ""
tf_backend_config_files:
# List of Terraform backend config files to use, one per line. Paths should be relative to the GitHub Actions workspace.
#
# Type: string
# Required: false
# Default: ""
tf_var_files:
# New line separated list of terraform variable files
#
# Type: string
# Required: false
# Default: ""
tf_vars:
# New line separated list of terraform variables
#
# Type: string
# Required: false
# Default: ""
tf_pre_run:
# Command to run before Terraform is executed.
#
# Type: string
# Required: false
# Default: ""
tf_workspace:
# Terraform workspace
#
# Type: string
# Required: false
# Default: ""