Terraform Preview Cleanup¶
Description¶
This workflow cleans up the Terraform preview deployments.
Inputs¶
name | description | type | required | default |
---|---|---|---|---|
environment |
Environment to deploy |
string |
false |
"" |
aws_account_id |
The AWS account ID. |
string |
false |
"" |
aws_region |
The AWS region. |
string |
false |
"" |
aws_role_name |
The name of the role to assume with OIDC. |
string |
false |
"" |
aws_oidc_role_arn |
AWS OIDC IAM role to assume |
string |
false |
"" |
gh_checkout_ref |
The branch, tag or SHA to checkout. |
string |
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 |
"" |
Usage¶
jobs:
job1:
uses: tx-pts-dai/github-workflows/.github/workflows/tf-cleanup.yaml@v2
with:
environment:
# Environment to deploy
#
# Type: string
# Required: false
# Default: ""
aws_account_id:
# The AWS account ID.
#
# Type: string
# Required: false
# Default: ""
aws_region:
# The AWS region.
#
# Type: string
# Required: false
# Default: ""
aws_role_name:
# The name of the role to assume with OIDC.
#
# Type: string
# Required: false
# Default: ""
aws_oidc_role_arn:
# AWS OIDC IAM role to assume
#
# Type: string
# Required: false
# Default: ""
gh_checkout_ref:
# The branch, tag or SHA to checkout.
#
# Type: string
# 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: ""