EXAMPLE: Active-Active, External Services Installation of Terraform Enterprise into an Existing Network
This example for Terraform Enterprise creates a TFE installation with the following traits:
- Active/Active
- External Services production type
- n1-standard-32 virtual machine type
- Ubuntu 20.04
- A publicly accessible HTTPS load balancer with TLS pass-through
This example assumes that the following resources exist:
- TFE license is on a file path defined by
var.license_file
- A DNS zone
- Valid managed SSL certificate to use with load balancer:
- Create/Import a managed SSL Certificate in Network Services -> Load Balancing to serve as the certificate for the DNS A Record.
- Existing Virtual Network
-
Read the entire README.md of the root module.
-
Ensure account meets module prerequisites from above.
-
Clone repository.
-
Change directory into desired example folder.
-
Create a local
terraform.auto.tfvars
file and instantiate the required inputs in the respective./examples/existing-network/variables.tf
including the path to the license under thelicense_file
variable value. -
Authenticate against the Google provider. See instructions.
-
Initialize terraform and apply the module configurations using the commands below:
NOTE:
terraform plan
will print out the execution plan which describes the actions Terraform will take in order to build your infrastructure to match the module configuration. If anything in the plan seems incorrect or dangerous, it is safe to abort here and not proceed toterraform apply
.terraform init terraform plan terraform apply
The build should take approximately 10-15 minutes to deploy. Once the module has completed, give the platform another 10 minutes or so prior to attempting to interact with it in order for all containers to start up.
Unless amended, this example will not create an initial admin user using the IACT, but it does output the URL for your convenience. Follow the advice in this document to create the initial admin user, and log into the system using this user in order to configure it for use.
- Navigate to the URL supplied via the
login_url
Terraform output. (It may take several minutes for this to be available after initial deployment. You may monitor the progress of cloud init if desired on one of the instances.) - Enter a
username
,email
, andpassword
for the initial user. - Click
Create an account
. - After the initial user is created you may access the TFE Application normally using the URL supplied via
login_url
Terraform output.