Problem
When upgrading Terraform Enterprise in an airgap environment directly to the latest version, an error similar to the following may be received.
intermediate release $RELEASE_NUMBER is required, cannot upgrade from $CURRENT_RELEASE to $PREFFERED_RELEASE
An example of an exact error message will appear as follows and may be used as the reference context for the remainder of this article.
intermediate release 519 is required, cannot upgrade from 416 to 523
Cause
Certain versions of Terraform Enterprise require an intermediate version to be installed prior to the latest version. This could be due to bug fixes or migrations and exists as a tool for the developers to ensure a smooth transition between Terraform Enterprise versions.
If an upgrade is selected that is a later version release than the required intermediate version, the selected release will be downloaded and subsequently by the user moved to the airgap update path directory (configured in replicated.conf
) where the installer will look for the new .airgap package. Terraform will then fail to update, showing the error message similar to the ones document above.
Solution
The downloaded version release file will need to be removed from the update path, in essence backing out of the upgrade attempt.
Use the following steps to remove the selected release airgap package from the update path in order to install the required intermediate release.
-
Access the airgap update directory on the Terraform Enterprise instance. The update path locaton can be retrieved from the console settings of your instance (https://<TFE HOSTNAME>:8800/console/settings) in the field Update Path update directory.
-
From the update directory on the TFE instance remove the release file that is causing the error that is indicated in the error message. In this example
intermediate release 519 is required, cannot upgrade from 416 to 523
the release file causing the error would be 523. -
Enter into the console-ui https://<TFE HOSTNAME>:8800/releases dashboard and check for updates and locate the intermediate release version to download. The intermediate required release version for a reference will be specified in same error message
intermediate release 519 is required, cannot upgrade from 416 to 523
, used in this example the intermediate release is 519. -
Download required intermediate release and follow the airgap upgrade instructions or once the release file is downloaded the upgrade can be conducted manually from the Terraform instance using the replicatedctl tool to update it
replicatedctl app-release apply --sequence 519
.