Terraform
- Terraform Enterprise
- 1.0.x (latest)
- v202507-1
- v202506-1
- v202505-1
- v202504-1
- v202503-1
- v202502-2
- v202502-1
- v202501-1
- v202411-2
- v202411-1
- v202410-1
- v202409-3
- v202409-2
- v202409-1
- No versions of this document exist before v202408-1. Click below to redirect to the version homepage.
- v202408-1
- 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
Migrating from Demo Mode to Mounted Disk Mode
Terraform Enterprise removed the Demo operational mode in v202204-1. We strongly recommend upgrading your instance from Demo mode to Mounted Disk mode.
If you are currently running Demo mode and wish to upgrade to Terraform Enterprise v202204-1, you must migrate your application data from the Demo mode Docker volumes to the Mounted Disk directory.
Determining the Operational Mode
Connect to your Terraform Enterprise instance and run the following command.
replicatedctl app-config export --template '{{ .installation_type.Value }}'
If Terraform Enterprise returns the value poc, you are running Demo mode and
must migrate your application data to the mounted disk directory.
Data Migration is Required
Terraform Enterprise will fail to start with the following error until you migrate your application data.
Unmet start requirement: Required setting "Mounted Disk Path" is not set.
If you run replicatedctl app status, you will see output similar to the
following.
[
    {
        "AppID": "f9486004126d40904381e029d76353d0",
        "Sequence": 609,
        "PatchSequence": 0,
        "State": "stopped",
        "DesiredState": "started",
        "Error": "Unmet start requirement: Required setting \"Mounted Disk Path\" is not set.",
        "IsCancellable": false,
        "IsTransitioning": false,
        "LastModifiedAt": "2022-04-11T21:02:18.613686589Z"
    }
]
The Replicated console shows the following page.

Migrating Application Data From Demo Mode to Mounted Disk Mode
- Connect to your Terraform Enterprise instance. 
- Create the mounted disk directory. You can choose any directory, but Terraform Enterprise expects that the directory is backed by persistent storage that can be mounted to the instance. - mkdir -p /opt/terraform-enterprise
- Set the - disk_pathapplication setting to the mounted disk directory.- replicatedctl app-config set disk_path --value '/opt/terraform-enterprise'
- Migrate the PostgreSQL data to the mounted disk directory. - Create the - postgresdirectory under the mounted disk directory.- mkdir -p /opt/terraform-enterprise/postgres
- Retrieve the PostgreSQL data path from the Docker volume. - demo_database="$(docker volume inspect postgres --format '{{ .Mountpoint }}')"
- Migrate the PostgreSQL data to the mounted disk directory. - cp -r "${demo_database}"/* /opt/terraform-enterprise/postgres
- Mark the PostgreSQL data as migrated. - touch /opt/terraform-enterprise/postgres/.poc-to-disk-migrated
 
- Migrate the object storage data to the mounted disk directory. - Create the - auxdirectory under the mounted disk directory.- mkdir -p /opt/terraform-enterprise/aux
- Retrieve the object storage data path from the Docker volume. - demo_object_storage="$(docker volume inspect aux --format '{{ .Mountpoint }}')"
- Migrate the object storage data to the mounted disk directory. - cp -r "${demo_object_storage}"/* /opt/terraform-enterprise/aux
- Mark the object storage data as migrated. - touch /opt/terraform-enterprise/aux/.poc-to-disk-migrated
 
- Restart Terraform Enterprise to apply the changes and start the application in Mounted Disk mode. - Stop Terraform Enterprise. - replicatedctl app stop
- Wait for Terraform Enterprise to stop. Terraform Enterprise is stopped once the - Stateshows- stopped.- replicatedctl app status
- Start Terraform Enterprise. - replicatedctl app start