# hashicorp/setup-terraform

Sets up Terraform CLI in your GitHub Actions workflow.

Repository: https://github.com/hashicorp/setup-terraform
Canonical: https://ross.abutalabs.com/products/setup-terraform
Homepage: https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
Language: JavaScript
License: MPL-2.0
License Family: copyleft
Last push: 2026-07-27T18:02:43+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 71, longevity 100
- inputs: {"age_days": 2323, "days_push": 37, "days_rel": 113, "gap_med": 77, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1583, forks 287 (observed 2026-08-28T04:05:07.266608+00:00)

## What it is
A GitHub Actions JavaScript action that installs a specified version of the Terraform CLI onto the workflow runner and adds it to PATH. It can also configure HCP Terraform/Terraform Enterprise credentials and install a wrapper that exposes terraform stdout, stderr, and exit codes as step outputs.

## Use cases
- install terraform cli in github actions workflow
- pin a specific terraform version in ci
- run terraform plan and apply on pull requests
- configure terraform cloud api token in ci
- capture terraform command output in workflow steps
- automate infrastructure provisioning with github actions

## When to choose
- you use GitHub Actions and need Terraform CLI available in your workflow
- you want automatic credential setup for HCP Terraform or Terraform Enterprise
- you need terraform command outputs (stdout/stderr/exitcode) as workflow step outputs

## When to avoid
- you use GitLab CI, Jenkins, or another CI system instead of GitHub Actions
- you need to install OpenTofu or other Terraform forks
- you run on self-hosted runners without Node.js installed

## Facets
- artifact type: plugin
- maturity: active
- function: infrastructure-as-code, ci-cd, developer-tools, cli
- domain: infrastructure-as-code, cloud-computing
- platform: windows, cloud
- tags: github-actions, terraform, terraform-cli, action, hashicorp, workflow-automation, devops, automation, linux, macos, docker

## Member repositories
- hashicorp/setup-terraform (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.266608+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:56:00.519210+00:00, confidence not recorded.
  - readme: https://github.com/hashicorp/setup-terraform (fetched 2026-08-28T04:05:07.266608+00:00, sha 21cd54511218)
  - homepage: https://developer.hashicorp.com/terraform/tutorials/automation/github-actions (fetched 2026-08-29T11:26:43.024895+00:00, sha 031eb38e153c)
  - site_page: https://developer.hashicorp.com/hcp/docs/vault-radar (fetched 2026-08-29T11:26:43.034144+00:00, sha 558d122b761a)
  - site_page: https://developer.hashicorp.com/terraform/install (fetched 2026-08-29T11:26:43.035871+00:00, sha 2e6ce87f11c9)
  - site_page: https://developer.hashicorp.com/terraform/docs (fetched 2026-08-29T11:26:43.037846+00:00, sha a0492af58be8)
  - site_page: https://developer.hashicorp.com/terraform/cloud-docs (fetched 2026-08-29T11:26:43.039534+00:00, sha c59a9bc4e2d7)
  - site_page: https://developer.hashicorp.com/terraform/docs/partnerships (fetched 2026-08-29T11:26:43.041131+00:00, sha 4853be8a2afc)
  - site_page: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/configuration-versions (fetched 2026-08-29T11:26:43.043115+00:00, sha 27f700d855e2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
