Problem
After migrating Terraform Enterprise (TFE) to a Flexible Deployment Option (FDO), the application uses a proxy configuration (e.g., http_proxy, https_proxy, no_proxy) that was not specified in the Docker Compose file.
Prerequisites
- Terraform Enterprise with Flexible Deployment Options is installed on the same Docker host(s) where a Replicated installation previously existed.
Cause
The incorrect proxy configuration is present at the Docker daemon level, and the TFE FDO container inherits these settings upon startup.
You can validate this by inspecting the environment variables injected into the container. First, find the container ID for the TFE image (e.g., images.releases.hashicorp.com/hashicorp/terraform-enterprise:vXXXX-YY) by running docker ps. Then, use the container ID with docker inspect <Container_ID> to review its configuration.
Solution
To resolve this issue, you must locate and remove the old proxy configuration from the Docker environment and restart the services.
-
SSH into the Terraform Enterprise instance and locate Docker configuration files.
$ find /etc/docker
- Inspect the files returned by the previous command for incorrect proxy settings. Additionally, check the
~/.docker/config.jsonfile and the root user's Docker configuration at/root/.docker/config.json. - After correcting the proxy configuration, restart the Docker service to apply the changes.
-
Navigate to the directory containing your Docker Compose file.
$ cd /path/to/docker_compose_file
-
Stop the TFE service.
$ docker compose down
-
Start the TFE service again.
$ docker compose up --detach
If you configured TFE as a Systemd service, restart it with the following command.
$ systemctl restart terraform-enterprise.service
Outcome
Once the legacy proxy configuration is removed and the services are restarted, the Terraform Enterprise FDO container will only use the configuration specified in its Docker Compose file.