Introduction
Installing Terraform Enterprise (TFE) with Flexible Deployment Options (FDO) on Docker requires a license file. This article explains how to provide the TFE license path to Docker using the TFE_LICENSE_PATH environment variable in your application settings.
Expected Outcome
You will successfully install TFE FDO using Docker with a license provided from a file path.
Prerequisites
- A valid Terraform Enterprise Flexible Deployment Options license key.
Use Case
Your organization requires you to provide the TFE application license from a file during a Docker-based installation.
Procedure
-
Create a directory for your Terraform Enterprise installation files. This guide uses
/root/tfe-fdoas an example.$ mkdir -p /root/tfe-fdo && cd /root/tfe-fdo
-
Create the license file and add your license key. Replace
<YOUR_LICENSE_KEY>with your actual license.$ echo "<YOUR_LICENSE_KEY>" > fdo-license.txt
-
In your
compose.yamlfile, define theTFE_LICENSE_PATHenvironment variable and mount the directory containing the license file as a volume.The
sourcepath for the volume should match the directory you created on the host machine, and thetargetpath is the location inside the container where Terraform Enterprise will look for the license file.services: tfe: ## ... other service configurations environment: TFE_LICENSE_PATH: /var/tmp/tfe-fdo/fdo-license.txt ## ... other environment variables volumes: - type: bind source: /root/tfe-fdo ## Host path where the license file is stored target: /var/tmp/tfe-fdo ## Container path where TFE will look for the license ## ... other volume configurationsNote: You can use different host and target paths to fit your environment's requirements. Ensure the
sourcepath exists on your host and theTFE_LICENSE_PATHvariable correctly points to the license file within thetargetpath.