https://github.com/hylandsoftware/terraform-plan-action
https://github.com/hylandsoftware/terraform-plan-action
github-action platform-engineering
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hylandsoftware/terraform-plan-action
- Owner: HylandSoftware
- License: mit
- Created: 2021-02-10T21:28:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T01:44:23.000Z (almost 3 years ago)
- Last Synced: 2025-01-24T12:11:18.364Z (over 1 year ago)
- Topics: github-action, platform-engineering
- Language: TypeScript
- Homepage:
- Size: 473 KB
- Stars: 0
- Watchers: 10
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Terraform Plan Action
This action wraps `terraform plan` to allow the plan and plan status to be posted as a status check in a pull request. This enhances the terraform examples that uses an inline action to post a comment to a PR.
The following arguments are automatically added to `terraform plan -no-color -input=false`. `no-color` is added since coloring won't be preserved in the output. `-input=false` is added to prevent the action from asking for input of a missing variable. This can cause the pipeline to pause and continue to churn billable minutes while not proceeding.
Example usage
```
- uses: HylandSoftware/terraform-plan-action@v1.1.1
with:
args: -var-file=./vars/vars.tfvars
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{ env.TERRAFORM_WORKING_DIRECTORY }}
```
Example 2:
* Specify a title for the status report (required if more then one per run)
* Specify multiple arguments to the plan as a quoted json array
```
- uses: HylandSoftware/terraform-plan-action@v1.1.1
with:
args: '["-lock=false", "-var-file=./vars/vars.tfvars"]'
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{ env.TERRAFORM_WORKING_DIRECTORY }}
report-title: Multiple Argument Run
```