cloudninjadev/AWS Terraform Action
Complete CI/CD for Terraform with AWS — fmt, validate, lint, docs, security scan, plan, and apply.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Apr 18, 2026
- License
- None
Pinned Snippet
uses: cloudninjadev/aws-terraform-action@f6eeb9bff662573d6d6686734d14b84465126751 # v2.0.2tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| terraform_version | Terraform version to install (e.g. "1.7.0" or "latest"). | no | latest |
| tflint_version | TFLint version to install (e.g. "v0.50.0" or "latest"). | no | latest |
| terraform_docs_version | terraform-docs version to install (e.g. "v0.17.0" or "latest"). | no | latest |
| working_directory | Directory that contains the Terraform root module. | no | . |
| run_fmt | Run `terraform fmt -check` to enforce formatting. | no | true |
| run_validate | Run `terraform validate` against the configuration. | no | true |
| run_lint | Run TFLint for additional linting rules. | no | true |
| run_docs | Generate / verify Terraform module documentation with terraform-docs. | no | false |
| docs_push | When run_docs=true, push the generated README.md back to the branch. Set to "false" to only verify docs are current (CI mode). | no | false |
| run_security_scan | Run Checkov security and compliance scan (soft-fail). | no | true |
| run_plan | Run `terraform plan`. | no | false |
| run_apply | Run `terraform apply`. | no | false |
| auto_approve | Pass `-auto-approve` to `terraform apply`. | no | false |
| aws_region | AWS region (required when any AWS operations are performed). | no | us-east-1 |
| aws_access_key_id | AWS Access Key ID (leave empty when using OIDC). | no | "" |
| aws_secret_access_key | AWS Secret Access Key (leave empty when using OIDC). | no | "" |
| aws_session_token | AWS Session Token for temporary credentials. | no | "" |
| role_to_assume | ARN of the IAM role to assume via OIDC. | no | "" |
| backend_config | Comma-separated list of backend config values (e.g. "bucket=my-bucket,key=tfstate"). | no | "" |
| var_file | Path to a tfvars file passed to plan / apply. | no | "" |
| extra_args | Additional arguments appended to terraform plan / apply commands. | no | "" |
| cache_plugins | Cache Terraform providers and TFLint plugins to speed up subsequent runs. | no | true |
| comment_on_pr | Post a summary comment on the pull request when triggered by a PR event. | no | true |
| github_token | GitHub token used to post PR comments. Pass secrets.GITHUB_TOKEN or github.token from your workflow. | no | "" |
Outputs
| name | description |
|---|---|
| fmt_outcome | Result of the terraform fmt step (success | failure | skipped). |
| validate_outcome | Result of the terraform validate step (success | failure | skipped). |
| lint_outcome | Result of the tflint step (success | failure | skipped). |
| plan_outcome | Result of the terraform plan step (success | failure | skipped). |
| apply_outcome | Result of the terraform apply step (success | failure | skipped). |
| plan_output | Text output produced by terraform plan. |