Terraform
- Terraform Enterprise
- 1.0.x (latest)
- v202507-1
- v202506-1
- v202504-1
- v202503-1
- v202502-2
- v202502-1
- v202501-1
- v202411-2
- v202411-1
- v202410-1
- v202409-3
- v202409-2
- v202409-1
- v202408-1
- No versions of this document exist before v202408-1. Click below to redirect to the version homepage.
- v202407-1
- v202406-1
- v202405-1
- v202404-2
- v202404-1
- v202402-2
- v202402-1
- v202401-2
- v202401-1
- v202312-1
- v202311-1
- v202310-1
- v202309-1
- v202308-1
- v202307-1
- v202306-1
- v202305-2
- v202305-1
- v202304-1
- v202303-1
- v202302-1
- v202301-2
- v202301-1
- v202212-2
- v202212-1
- v202211-1
- v202210-1
- v202209-2
- v202209-1
- v202208-3
- v202208-2
- v202208-1
- v202207-2
- v202207-1
- v202206-1
Configure the operational mode
This topic describes how to specify the operational mode for your Terraform Enterprise deployment.
Introduction
The operational mode determines where Terraform Enterprise stores and retrieves data, which can impact your backup and restore procedures, disaster recovery procedures, and scaling options. The operational mode is required to deploy Terraform Enterprise for all runtimes except Kubernetes. Refer to Data storage settings overview for additional information.
Recommended modes
Use the following guidelines to help you choose the appropriate mode.
active-active
Set TFE_OPERATIONAL_MODE  to active-active under the following conditions:
- Your environment has an external PostgreSQL server, S3-compatible object storage, and Redis instance.
- You have experience managing a PostgreSQL server, such as Amazon RDS for PostgreSQL, Google Cloud SQL for PostgreSQL, or Azure Database for PostgreSQL.
- You have experience managing an S3-compatible object storage location, such as AWS S3, Azure Blob Storage, Google Cloud Storage, or MinIO.
- You have experience managing a Redis instance, such as AWS ElastiCache for Redis, Azure Cache for Redis, or Google Cloud Memorystore for Redis.
- You want to use native backup and restore features provided by the external PostgreSQL server and S3-compatible object storage.
- You want to scale beyond a single instance of Terraform Enterprise to increase reliability and performance.
external
Set TFE_OPERATIONAL_MODE  to external under the following conditions:
- Your environment has an external PostgreSQL server, S3-compatible object storage, and Redis instance.
- You have experience managing a PostgreSQL server, such as Amazon RDS for PostgreSQL, Google Cloud SQL for PostgreSQL, or Azure Database for PostgreSQL.
- You have experience managing an S3-compatible object storage location, such as AWS S3, Azure Blob Storage, Google Cloud Storage, or MinIO.
- You have experience managing a Redis instance, such as AWS ElastiCache for Redis, Azure Cache for Redis, or Google Cloud Memorystore for Redis.
- You want to use native backup and restore features provided by the external PostgreSQL server and S3-compatible object storage.
- You want to scale beyond a single instance of Terraform Enterprise to increase reliability and performance.
disk
Set TFE_OPERATIONAL_MODE  to disk under the following conditions:
- Your environment does not have an external PostgreSQL server or S3-compatible object storage.
- You have experience managing persistent storage, such as an AWS EBS volume, an Azure Managed Disk, a Google Cloud Persistent Disk, or an iSCSI location.
- You are familiar with using command line tools, such as cp,scp, andrsync, to backup and restore data.
Requirements
The requirements depend on which operational mode you choose.
external mode
- Refer to the PostgreSQL configuration requirements for stateful application data storage requirement details.
- Refer to the data object storage configuration requirements for requirements.
active-active mode
- Refer to the PostgreSQL configuration requirements for stateful application data storage requirement details.
- Refer to the data object storage configuration requirements for requirements.
- Refer to the Redis data store configuration requirements for requirements.
disk mode
One of the following mounted disk types is required for the persistent storage volume:
- AWS EBS
- GCP zonal persistent disk
- Azure disk storage
- iSCSI
- SAN
- A disk physically connected to the host machine
Specify operational mode
Add the TFE_OPERATIONAL_MODE variable to your Terraform Enterprise configuration and specify a mode. The following example sets the mode to external when deploying to Docker:
name: terraform-enterprise
services:
   tfe:
      image: images.releases.hashicorp.com/hashicorp/terraform-enterprise:<vYYYYMM-#>
      environment:
         TFE_OPERATIONAL_MODE: "external"   
Refer to the TFE_OPERATIONAL_MODE configuration reference for details about operational mode settings.