crosswave-technology/Terraform Control
Run terraform init/plan/apply/destroy with summarized outputs.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit May 18, 2026
- License
- None
Pinned Snippet
uses: crosswave-technology/actionlibrary-terraform-control@0385dae6cd252a13b60c8c59f8b695c88f8c5964 # v1.1.4tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| working-directory | Directory containing Terraform configuration. | yes | — |
| command | Terraform command: plan, apply, destroy, validate, or fmt. | no | plan |
| terraform-version | Terraform version to install if not present (e.g. 1.7.5). | no | "" |
| init-args | Additional args for terraform init. | no | "" |
| plan-args | Additional args for terraform plan. | no | "" |
| apply-args | Additional args for terraform apply. | no | "" |
| destroy-args | Additional args for terraform destroy. | no | "" |
| validate-args | Additional args for terraform validate. | no | "" |
| fmt-args | Additional args for terraform fmt -check. | no | "" |
| run-fmt | Run terraform fmt -check before the command. | no | false |
| run-validate | Run terraform validate before the command. | no | false |
| validate-on-plan | Run terraform validate before plan. | no | true |
| checkov-enabled | Run checkov scan before plan. | no | true |
| checkov-framework | Checkov framework to scan. | no | terraform |
| checkov-var-file | Optional Checkov var-file path (repo-relative). | no | .github/repo_config.tfvars |
| checkov-fail-severities | Comma-separated list of Checkov severities that fail the run. | no | CRITICAL,HIGH |
| comment-on-pr | Post a PR comment for plan results. | no | true |
| pr-number | PR number to comment on when not running under pull_request. | no | "" |
| auto-approve | When true, add -auto-approve for apply/destroy. | no | false |
| emit-full-plan | When true, include full plan output in the action summary. | no | false |
| emit-summary | When true, include a structured summary in the action summary for plan/apply. | no | true |
| emit-raw-plan | When true, include the raw plan output in the action summary. | no | true |
| comment-section-id | Section ID for the consolidated PR comment block (e.g. plan-123456789). When set, posts to a single consolidated comment instead of a standalone comment. Derived from working-directory slug when empty. | no | "" |
| summary-max-lines | Maximum diff lines per resource in the summary. | no | 80 |
| outputs-display | Display Terraform outputs: all, changes_only, or nothing. | no | changes_only |
| git-modules-token | Optional token for cloning private Terraform modules during init. When set, configures git credential helper before terraform init. | no | "" |
Outputs
| name | description |
|---|---|
| plan_exit_code | Exit code from terraform plan (0=clean,2=changes,1=error). |
| plan_has_changes | true when terraform plan detects changes. |
| plan_add | Resources to add. |
| plan_change | Resources to change. |
| plan_destroy | Resources to destroy. |
| plan_summary | Plan summary string. |
| plan_file | Absolute path to the plan file. |
| plan_text_file | Absolute path to the rendered plan text. |
| plan_log_file | Absolute path to the terraform plan log file. |
| trace_file | Absolute path to the Terraform trace log file (if generated). |
| plan_error_count | Number of distinct Error: blocks detected in plan output. |
| plan_error_file | Path to file containing extracted plan errors. |
| apply_exit_code | Exit code from terraform apply. |
| apply_log_file | Absolute path to the terraform apply log file. |