Problem
During a Terraform Enterprise installation, the process fails. The user interface may show a 504 error, and the replicated container logs display the following error message:
Failed to read config: json: cannot unmarshal string into Go struct field Params.ReleaseSequence of type int
This issue occurs when using the ReleaseSequence property in the /etc/replicated.conf file to pin the installation to a specific version.
Cause
The Terraform Enterprise installer requires the ReleaseSequence property in the /etc/replicated.conf file to be an integer. If the value is enclosed in double or single quotes, the installer interprets it as a string. This data type mismatch causes a JSON unmarshaling error, which halts the installation process.
Solutions
There are two methods to resolve this issue.
Solution 1: Correct the replicated.conf File
Ensure the value of the ReleaseSequence property in the /etc/replicated.conf file is a number and is not enclosed in quotes.
Example replicated.conf:
{
"ReleaseSequence": 619
}Solution 2: Use the release-sequence Command-Line Flag
Alternatively, pass the release sequence as a command-line flag to the installation script. The shell script correctly processes the value even when it is enclosed in quotes.
For Terraform Enterprise v202205-1 or later, run the following commands:
$ curl -o install.sh https://install.terraform.io/tfe/stable
$ bash ./install.sh \ no-proxy \ private-address=1.2.3.4 \ public-address=5.6.7.8 \ release-sequence="619"
For versions prior to v202205-1, run the following commands:
$ curl -o install.sh https://install.terraform.io/ptfe/stable
$ bash ./install.sh \ no-proxy \ private-address=1.2.3.4 \ public-address=5.6.7.8 \ release-sequence="523"
Additional Information
- For more details on installer configuration, refer to the Replicated documentation on automated installation.