Pinning Terraform Enterprise Docker Image Versions
Introduction
This guide explains how to pin the Terraform Enterprise Docker image to a specific version in your deployment configuration. HashiCorp does not support :latest or n-1 tags for Terraform Enterprise images to prevent unintentional upgrades and ensure deployment stability. Pinning to an explicit version provides predictable behavior and controlled upgrades.
Prerequisites
- An existing Terraform Enterprise installation.
- Access to your Docker and Docker Compose environment.
- Permission to pull images from
images.releases.hashicorp.com.
Procedure
Follow these steps to pin your Terraform Enterprise image to a specific version.
-
Select a Terraform Enterprise Version
Navigate to the official Terraform Enterprise Release Page and select a specific version that meets your organization's requirements.
-
Update the
docker-compose.ymlFileIn your
docker-compose.ymlfile, locate theimagekey for the Terraform Enterprise service and update it with the full image path and the specific version tag you selected. This ensures that Docker always pulls the exact version specified.Update the
imageline in your configuration file.services: terraform-enterprise: image: images.releases.hashicorp.com/hashicorp/terraform-enterprise:v202401-1 ## ... other configuration -
Deploy and Verify the Pinned Version
Before applying changes to a production environment, deploy the updated configuration in a staging or test environment. This allows you to validate compatibility and confirm that your infrastructure operates as expected with the pinned version.