Terraform Enterprise (TFE) requires a valid license file to operate. This file governs access to features and the ability to pull container images from the private registry. In FDO deployments, if the license is expired and the TFE instance restarts, it will fail to pull the required images, causing service downtime.
This article provides the necessary steps to safely update the license file, check its status, and restart the services without causing disruption.
Note - If the license expires, TFE will continue to run until restarted. However, upon restart, it will not be able to pull images, and the application will fail to start.
What is the License File Used For?
-
The license file is used to:
-
Enable Terraform Enterprise features.
-
Authenticate with the private image registry to pull containers used by TFE.
-
Define usage limits and support levels.
-
Update the License File
Step 1 - Gracefully Stop the TFE Container
tfectl node drain --all #
docker compose down # on all the nodes
Step 2 - Back up the License File
take the back up of the existing licence
Step 3 - Copy the New License File
you will need to modify theTFE_LICENSE
orTFE_LICENSE_PATH
variable in the compose file
These variable should now have the new license data
Step 4 - Restart the TFE Container
docker compose up -d
Step 4 - Verify the NewLicense
tfectl app license
Ensure that the new expiry date is reflected correctly .
Tips and Best Practices
-
Always renew the license ahead of expiry to avoid image pull failures.
-
Schedule license checks as part of monthly maintenance and create a monitoring alert if the license is about to expire.
References
https://developer.hashicorp.com/terraform/enterprise/deploy/configuration/license