shared-actions/terraform-validate
2026-04-24 15:57:40 +02:00
..
action.yml refactor: move action to repo root 2026-04-24 15:57:40 +02:00
README.md refactor: move action to repo root 2026-04-24 15:57:40 +02:00

terraform-validate

Validate Terraform code without a backend (for PR checks).

Inputs

Input Required Default Description
jfrog-token Yes Sets TF_TOKEN_schmalz_jfrog_io for provider auth
terraform-dir No terraform Directory containing .tf files
terraform-version No 1.11 Terraform version to use
aws-role-arn No "" If provided, runs aws-configure before validate
aws-profile No stage AWS profile when aws-role-arn is given

Usage

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

Notes

  • Runs terraform init -backend=false, terraform fmt -check -recursive, and terraform validate.
  • Sets TF_WORKSPACE=stage during init.
  • Provider cache is restored/saved automatically.
  • Optionally configures AWS credentials if aws-role-arn is provided (requires enable-openid-connect: true).