Skip to main content

Overview

Use qovery terraform to run and manage the Terraform services of an environment from the terminal: list them, run a plan, plan and apply, delete their resources, unlock or migrate their state, and manage their external secrets.

Examples

List the Terraform services of an environment:
Run a plan without applying it, and follow it until it finishes:
Plan and apply the newest commit of the branch:
Plan and apply several Terraform services at once:

Access the Terraform state

setup-backend generates a backend.tf file that points Terraform at the state Qovery stores for a Terraform service. The command asks before it writes the file in the current directory. The state can contain secret values, so keep backend.tf and any local copy of the state out of version control. --terraform (-t) takes the ID (UUID) of the Terraform service, not its name. Without it, the command uses the service in the current context.

Command reference

Generated from qovery terraform --help (CLI v1.180.0). Every command also accepts -h, --help and the global flags.

qovery terraform

Manage terraform services
Usage
No command-specific flags.

qovery terraform delete

Delete terraform resources
Description from qovery terraform delete --help
Usage

qovery terraform external-secret

Manage terraform external secrets
Usage
No command-specific flags.

qovery terraform external-secret create

Create terraform external secret
Usage

qovery terraform external-secret delete

Delete terraform external secret
Usage

qovery terraform external-secret update

Update terraform external secret
Usage

qovery terraform force-unlock

Force unlock terraform state file
Description from qovery terraform force-unlock --help
Usage

qovery terraform list

List terraform services
Usage

qovery terraform migrate-state

Migrate terraform state to new backend
Description from qovery terraform migrate-state --help
Usage

qovery terraform plan

Run terraform plan (dry-run)
Usage

qovery terraform plan-and-apply

Deploy terraform (plan and apply)
Usage

qovery terraform setup-backend

Generate a Terraform backend configuration file that can be used to access your tf-state
Usage