This example for Terraform Enterprise creates a TFE installation with the following traits:
var.node_count
This example assumes that the following resources exist:
var.license_file
Existing Amazon Machine Image defined by var.ami_id
NOTE: The base image used for the custom image should be Ubuntu or RHEL to work with the root module as-is.
This example will either use the ami_id
directly, or you may use a data source to filter
on the specific AMI to use.
In the ami_id
data source, you will notice that this example filters on three criteria, a
unique key/value pair, the virtualization type, and whether or not to use the latest image
in which this search results. Because it is important that Terraform is only able to find
one AMI based on the search of this data source,
you may decide to add more filters in order to narrow down your search.
Otherwise, you may decide to provide the ami_id
variable directly, instead of using the
data source. To do this, simply provide a value for the ami_id
variable with the specific
AMI ID that you wish to use. If you choose to do this, you do not need to provide values for
the other variables that begin with ami_
.
terraform.auto.tfvars
file and instantiate the required inputs as required in the respective ./examples/existing-image/variables.tf
including the path to the license under the license_file
variable value.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 to terraform 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.
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)username
, email
, and password
for the initial user.Create an account
.login_url
Terraform output.