Overview
Terraform Enterprise v202404-2 (Replicated deployments), introduces a new implementation of the Replicated Admin commands (tfe-admin). While most commands are unaffected and functionality identically, there are a couple notable differences which may require modifications to existing workflows. This article outlines the details of this change, which commands are affected, and what actions are required by Terraform Enterprise users to accommodate this change.
Prerequisites
- Terraform Enterprise >=v202404-2
- Replicated deployment
Background
In Replicated deployments >=v202404-2, the tfe-admin command (sourced from /etc/replicated.alias) was reimplemented to use the new Terraform Enterprise admin CLI, tfectl. Previously, admin commands were executed in a container named tfe-admin, which ran a program called tfe-admin. As of v202404-2, the tfe-admin container was removed. In this and following releases of Replicated deployments, the tfe-admin command now executes the newer tfectl utility from a shell in the terraform-enterprise container.
Required Actions
Depending on the the commands used, a few modifications to existing workflows may be necessary.
app-config
tfe-admin app-config set -k <key> -v <value>
tfectl does not have the capability to modify Replicated application application configuration (those settings displayed by replicatedctl app-config export). As a replacement for the command above, to make a configuration change across all Terraform Enterprise nodes, use the following command on on each node.
replicatedctl app-config set <key> --value <value>
For the configuration changes to take effect, the Terraform Enterprise application must be restarted on each node. Refer to the updated documentation in the Admin CLI reference on how to update configuration in Active/Active Replicated deployments across all nodes.
support-bundle
tfe-admin support-bundle
The tfe-admin support bundle command previously generated a bundle from all nodes in an Active/Active deployment. To generate a bundle from all nodes, provide the --all
flag to the tfe-admin support-bundle command.
tfe-admin support-bundle --all
Reference
The table below providers a mapping of tfe-admin commands to tfectl commands for reference.
tfe-admin db-backup | tfectl db backup |
tfe-admin db-restore | tfectl db restore |
tfe-admin db-reindex | tfectl db reindex |
tfe-admin retrieve-iact | tfectl admin token |
tfe-admin health-check | tfectl app status |
tfe-admin support-bundle | tfectl support bundle |
tfe-admin node-drain | tfectl node drain |
tfe-admin list-nodes | tfectl node list |
tfe-admin app-config | tfectl app config |
tfe-admin rotate-encryption-password | tfectl app rotate-encryption-password |
tfe-admin license-info | tfectl app license |
tfe-admin background-migration-status-required | tfectl db migration-status --required-only |
tfe-admin background-migration-status-all | tfectl db migration-status |
For details on the usage of the tfectl utility, consult the documentation linked below or pass the --help
option to the tfe-admin to display usage.
Additional Information
- Terraform Enterprise admin CLI reference (tfectl)
- Terraform Enterprise Admin CLI Commands (tfe-admin)