terraform

Used to provision and manage cloud infrastructure using declarative configuration files.


What is external terraform

The terraform image packages HashiCorp Terraform, an infrastructure-as-code (IaC) tool used to provision and manage cloud infrastructure using declarative configuration files. terraform allows teams to define, version, and automate infrastructure across providers like AWS, Azure, GCP, Kubernetes, and more.

This image includes the Terraform CLI and is typically used in CI/CD pipelines, containerized workflows, or ephemeral dev environments. It enables reproducible and consistent infrastructure provisioning without requiring Terraform to be installed directly on the host system.

The terraform image is popular among platform engineers, DevOps teams, and security-conscious organizations who prefer to encapsulate infrastructure tooling in isolated, containerized runtimes.

How to use this image

The terraform image is most commonly used for running terraform commands in a pipeline or container shell.

Basic usage (run interactively):

bashCopyEditdocker run -it hashicorp/terraform version

Run Terraform commands against local config:

‍bashCopyEditdocker run -it -v $(pwd):/workspace -w /workspace hashicorp/terraform initdocker run -it -v $(pwd):/workspace -w /workspace hashicorp/terraform plan

Use in CI pipelines (e.g. GitHub Actions, GitLab CI):

‍yamlCopyEditimage: hashicorp/terraform:1.6.6script:- terraform init- terraform validate- terraform plan

Logging and behavior:

Terraform outputs logs and CLI results to stdout. Most Terraform usage is stateless within the container, relying on local mounts for .tf files and remote backends (e.g. S3, GCS, Terraform Cloud) for state storage.

Image variants

The terraform image is published under hashicorp/terraform and versioned by official Terraform releases. There are no OS-specific or alpine-based variants.

‍hashicorp/terraform:latest

Tracks the latest stable release.Use for local testing or development environments where breakage from version changes is acceptable.

hashicorp/terraform:<version>

Tagged by specific version (e.g.1.6.6, 1.5.7, etc.).Recommended for production use, automated pipelines, and reproducibility.The image is based on a minimal Debian environment and includes only the Terraform CLI binary and core dependencies.

Interested in base images that start and stay clean?

This is a not a valid email
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.