Introduction
Terraform Enterprise requires a license in order to maintain normal operations. These licenses have an expiration date, and must be updated once expired. This article provides the guidelines for updating licenses in Terraform Enterprise.
Finding the expiration date
There are two methods to find the expiration date from the existing installation of Terraform Enterprise; the Replicated console UI or the Replicated command line interface.
Replicated Console
-
Navigate to the Replicated console which is located at
https://<<TFE_HOSTNAME>>:8800
and click on the gear icon on the top-right corner. -
Select the View License menu and the details of the existing license will be displayed on the screen with the expiration date.
Replicated Command Line Interface
-
Connect to the Terraform Enterprise host machine using SSH.
-
Use the
replicatedctl license inspect
command to inspect the license information. TheExpirationTime
value in the output indicates the expiration date/time in UTC.$ replicatedctl license inspect [ { "ID": "670bd320b95245325d80be703330f9b3", "Assignee": "Test Customer Name", "LegacyChannelName": "Stable", "ChannelID": "", "Channels": [], "ExpirationTime": "2021-06-30T00:00:00Z", "ExpirationPolicy": "ignore", "IsExpired": false, "IsActivationRequired": false, "ActivationEmail": "", "Fields": [ { "FieldName": "max_hosts", "FieldTitle": "Maximum Number of Hosts", "FieldType": "Integer", "Value": "9999" }, { "FieldName": "min_hosts", "FieldTitle": "Minimum Number of Hosts", "FieldType": "Integer", "Value": "1" } ] } ]
Update License - Online Installation Type
Automatic Updates
With the online installation type, Terraform Enterprise can be configured to check for the updated license periodically by using the following steps.
-
Navigate to the Replicated console, which is located at
https://<<TFE_HOSTNAME>>:8800
-
Click on the gear icon on the top-right corner then select the Console Settings menu.
-
Scroll down to the License Sync section and choose the frequency with which the license should be checked.
Manual Updates
Replicated Console
-
Navigate to the Replicated console, which is located at
https://<<TFE_HOSTNAME>>:8800
, click on the gear icon on the top-right corner, and select the View License menu. -
Click on Sync License to start the operation.
Replicated Command Line Interface
-
Obtain the newly updated license file from HashiCorp and copy it to the Terraform Enterprise host machine.
-
Connect to the Terraform Enterprise host machine using SSH.
-
Use the following command to load the new license.
$ replicatedctl license-load < /path/to/license.rli
Update License - Airgap Installation Type
Replicated Console
-
Navigate to the Replicated console, which is located at
https://<<TFE_HOSTNAME>>:8800
. -
Click on the gear icon on the top-right corner and select the Console Settings menu.
-
Select Airgapped Settings from the left-hand menu and upload the license.
Replicated Command Line Interface
-
Obtain the updated license and airgap package from HashiCorp and copy them to the Terraform Enterprise host.
-
Connect to the Terraform Enterprise host machine using SSH.
-
Execute the following command, updating the paths as needed.
$ replicatedctl license-load --airgap-package /path/to/bundle.airgap < /path/to/license.rli
Troubleshooting Guides
No error but the license is not updated
In the Airgap installation, the license update operation may finish without any error but the license detail displayed on the Replicated console or the Replicated command line output is still not updated. This symptom can be related to the incorrect license file being used. In order to further identify the symptom, please follow these steps:
-
Connect to the Terraform Enterprise host machine using SSH.
-
Examine the output of the command
docker logs replicated
and look for the warning message below.WARN 2021-02-22T01:40:00+00:00 tasks/app_tasksteps.go:113 Airgap license on disk does not match installed license
-
If this warning message occurs, it indicates that the incorrect license file is being used. Please contact your Customer Success Manager if you have one assigned to your account, or contact HashiCorp Support for further assistance. When contacting support, please include the output from the
replicatedctl license inspect
command after running it on the existing Terraform Enterprise host machine.
Unable to sync license: Error: Unsuccessful HTTP response
The error message below may occur due to several possible issues.
Unable to sync license: Error: Unsuccessful HTTP response
-
Network communication to the Replicated servers
This symptom can happen with the online installation type when the current network infrastructure has changed since the installation of Terraform Enterprise. Terraform Enterprise requires network communication to the Replicated endpoints, as noted in the network requirements guideline. With the license sync operation, the Replicated installer will attempt to contact
api.replicated.com
in order to retrieve the license information. The specific IP addresses of Replicated services for the Terraform Enterprise can be found in Replicated’s GitHub repository. -
Mismatched customer name between the installed license and the new license.
This symptom can happen with the Airgap installation type in some conditions, for example, when a trial license was issued with a customer name and the new paid license was issued on a different customer name. If you are on the Airgap installation and encountered this error, please contact HashiCorp Support together with the output from the command
replicatedctl license inspect
from the existing Terraform Enterprise host machine to request for further assistance.
Failed to start the app: license has expired
You may encounter startup failures when restarting Terraform Enterprise with an expired license.-
Connect to the Terraform Enterprise host machine using SSH.
-
Examine the output of the command
docker logs replicated
and look for the warning message below.
Failed to start the app: license has expired - If this warning message occurs, it indicates that your license file has expired. Please contact your Customer Success Manager if you have one assigned to your account, or contact HashiCorp Support for further assistance. When contacting support, please include the output from the
replicatedctl license inspect
command after running it on the existing Terraform Enterprise host machine.
Incorrect version of airgap file
The error message below indicates the incorrect version of airgap file being used against the installed version of Terraform Enterprise.
installed app release (325b33bf0ad539c994644423128cad5e:502) does not match the airgap package
You will be able to identify the version of an airgap file by browsing into the airgap download page where it displays the versions of Terraform Enterprise and their SHA256 checksum values, which can be used to identify against the downloaded airgap package in your local environment.
Unable to save console settings
The error message below may occur in Replicated console when License is uploaded
Error while saving console settings: snapshot schedule: make spec: unknown schedule type ""
If this error occurs, please disable Snapshot temporarily by uncheck Enable Automatic Scheduled Snapshots
Additional information
If you continue to experience the issues after following the guides, please contact HashiCorp Support to request for further assistance.