Introduction
The internal services that make up Terraform Enterprise use certain network addresses for communication. Terraform Enterprise expects these network addresses to be reserved exclusively for its own usage. These network addresses should not overlap with each other or any other network Terraform Enterprise is expected to communicate with. By default, Terraform Enterprise uses the following IPv4 network addresses:
- Docker:
172.17.0.0/16,172.19.0.0/16,172.20.0.0/16 - Replicated:
172.18.0.0/16
Use Case
The default network addresses used by Terraform Enterprise may already be in use elsewhere on the network, causing network connectivity issues for Terraform Enterprise. In such cases, it is necessary to change the network addresses that Terraform Enterprise uses.
Procedure
For installations of Terraform Enterprise, the Docker and Replicated network addresses can be changed independently. That is, you may change only one of them if so desired.
This example details how to change the Docker network addresses to 10.10.0.0/16 and 10.11.0.0/16, and the Replicated network address to 10.12.0.0/16. If you are using different network addresses, please change the values accordingly.
Stop the Terraform Enterprise application.
$ sudo replicatedctl app stopEnsure the Terraform Enterprise application is stopped. The output should show the
Stateasstopped.$ sudo replicatedctl app statusStop the Replicated services.
$ sudo systemctl stop replicated replicated-ui replicated-operatorStop all of the running Docker containers on the host.
$ sudo docker stop $(sudo docker ps -q)Delete the
replicated_retracedDocker network.$ sudo docker network rm replicated_retracedFor installations running version
v202104-1or greater, delete thetfe_servicesandtfe_terraform_isolationDocker networks.$ sudo docker network rm tfe_services $ sudo docker network rm tfe_terraform_isolationCreate a new
replicated_retracedDocker network using the desired network address.$ sudo docker network create replicated_retraced --subnet=10.12.0.0/16Create the file
/etc/docker/daemon.jsonwith the following content. Note, the value ofbipis a network address, not just a subnet. This is because Docker will use this IPv4 address as its bridge IP address and the rest of the subnet will be for containers Docker creates.{ "bip": "10.10.0.1/16", "default-address-pools": [ { "base": "10.11.0.0/16", "size": 24 } ] }Restart the Docker service.
$ sudo systemctl restart dockerStart the Replicated services.
$ sudo systemctl start replicated replicated-ui replicated-operatorStart the Terraform Enterprise application.
$ sudo replicatedctl app startEnsure the Terraform Enterprise application is started. The output should show the
Stateasstarted.$ sudo replicatedctl app status
Additional Information
If you continue to experience issues after following this guide, please contact HashiCorp Support for further assistance.