shared-actions/terraform-validate
Michael Seele 0002cc31ce
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 1m6s
feat: add terraform-validate action
2026-04-30 13:44:07 +02:00
..
action.yml feat: add terraform-validate action 2026-04-30 13:44:07 +02:00
README.md feat: add terraform-validate action 2026-04-30 13:44:07 +02:00

terraform-validate

Validate Terraform configuration files using the official Terraform CLI.

Inputs

Input Required Default Description
terraform-dir No terraform Directory containing .tf files
terraform-version No ~1.15 Terraform version to use
terraform-workspace No "" Terraform workspace to use
jfrog-token No "" JFrog Artifactory token for the Terraform provider registry (TF_TOKEN_schmalz_jfrog_io)

Usage

- uses: schmalz/shared-actions/.forgejo/actions/terraform-validate@v1
  with:
    terraform-workspace: stage
    jfrog-token: ${{ secrets.JFROG_TOKEN }}

Notes

  • Runs terraform init -backend=false, terraform fmt -check -recursive, and terraform validate.
  • Sets TF_WORKSPACE during validate if terraform-workspace is provided.
  • Sets TF_TOKEN_schmalz_jfrog_io on both init and validate steps if jfrog-token is provided.