shared-actions/terraform-apply
Michael Seele f3878d443b
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 1m25s
feat: add terraform-apply action
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 07:52:38 +00:00
..
action.yml feat: add terraform-apply action 2026-05-04 07:52:38 +00:00
README.md feat: add terraform-apply action 2026-05-04 07:52:38 +00:00

terraform-apply

Apply 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
var-file No "" Path to .tfvars file, relative to terraform-dir
workspace No "" Terraform workspace to select
jfrog-token No "" JFrog Artifactory token for the Terraform provider registry (TF_TOKEN_schmalz_jfrog_io)

Usage

- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/terraform-apply@terraform-apply-v1
  with:
    workspace: stage
    var-file: stage.tfvars
    jfrog-token: ${{ secrets.JFROG_TOKEN }}

Notes

  • Runs terraform init, selects the workspace (if provided), and applies with -auto-approve.
  • Sets TF_TOKEN_schmalz_jfrog_io on both init and apply steps if jfrog-token is provided.
  • If var-file is provided, it is passed as -var-file to the apply command.