Skip to main content
This feature is available on:
  • AWS Managed Cluster
  • GCP Managed Cluster
Supported Secrets Providers:
  • AWS Secrets Manager
  • AWS Parameter Store
  • GCP Secret Manager
The secret synchronization infrastructure is stable. The interface may evolve.

Secret Manager Access benefits

Compared to Qovery built-in secrets, integrating a dedicated Secret Manager offers several key advantages:
  • Security and data sovereignty: Your secrets stay entirely within your own infrastructure and are never transmitted through Qovery’s systems. Secret values are fetched directly by External Secret Operator from your provider into your cluster, minimizing the number of systems that ever handle raw secret values. With built-in secrets, the value passes through Qovery’s API and storage layer.
  • Centralized secret management: Use your existing secrets provider as a single source of truth across all your infrastructure — Qovery services, Lambda functions, CI pipelines, and other tools all reference the same secrets without duplication. A secret defined once can also be consumed by multiple clusters (e.g., staging and production) without recreating it in each environment.
  • Simplified and automatic secret rotation: When a shared secret needs updating, change it once in your secrets manager, then redeploy the affected services via Qovery to pick up the new value. You can also leverage native automatic rotation from your provider (e.g., database credentials rotated via a Lambda function) — Qovery services will benefit from it in the next deployment without any additional secret management step.
  • Audit trails and compliance: Cloud-native secret managers provide built-in versioning, access logs, and fine-grained IAM policies — seamlessly extending your existing compliance posture to secrets consumed by Qovery services.

How it works

Qovery integrates with external secrets by deploying ESO (External Secrets Operator) in your cluster.

Configure a Secret Manager Access

You can configure a Secret Manager Access in the Add-ons section of your cluster.
Overview add Secret Manager Access
Creating or Editing a Secret Manager Access requires the cluster to be redeployed
Select the guide for your secrets provider:

AWS Secrets Manager

Connect to AWS Secrets Manager from an AWS or GCP cluster

AWS Parameter Store

Connect to AWS Parameter Store from an AWS or GCP cluster

GCP Secret Manager

Connect to GCP Secret Manager from a GCP or AWS cluster

Reference the external secrets in your services

Setting external secrets at the environment level multiplies cloud costs.You can set external secrets at the environment level to inject them to all services, but be careful:
  • The secret value will be fetched individually for each service running in the environment.
  • With many services, this multiplies the number of secret fetches and can significantly increase your cloud costs.
Prefer service-level secrets when only a subset of services need access to the value.

Using the Qovery Console

Once your cluster is deployed, you can link external secrets to any service:
  • Open your service
  • Navigate to the Variables tab
  • Select the External secrets tab
  • Click Add external secret
External Secrets path
Qovery automatically lists the secrets available in your Secrets Provider to simplify setup:
External Secrets list secrets available
You can filter results by prefix to narrow the list:
External Secrets list secrets available by prefix
To create an external secret, you need to:
  • Select the Secret Manager Access
  • Select the secret from your Secret Manager
  • Provide the environment variable key to inject
External Secrets details
Similarly to a basic environment variable, you can create an external secret that can be mounted to a file:
External Secret file details
External secrets are fetched only at deployment. A running service won’t automatically pick up changes to its external secrets — it requires a redeploy.

Selecting a value from a JSON secret

Set json_target_key when creating or updating an external secret through the variable API to inject one value from a JSON document. The secret is fetched inside your cluster at deployment time. q-core stores the selector as supplied and sends it to the deployment engine, which converts it into an ESO property expression. Send the member path shown in these examples; full GJSON queries are not supported.
JSON selection requires API and deployment engine versions that support json_target_key. Generated API schemas, SDKs, Console, CLI, and Terraform provider support are updated separately. The examples below use the variable API directly.

Create an external secret with a JSON selector

For example, the remote secret /production/config can contain:
The following request body for POST /variable creates a variable named DATABASE_PASSWORD whose value at deployment will be secret-db:
Replace variable_parent_id with your container’s ID and secret_manager_access_id with the ID of its Secret Manager Access. The value field identifies the remote secret; json_target_key selects a value inside it. is_secret stays false for external secrets: Qovery stores the reference, while ESO fetches the secret value inside your cluster. API responses return the original selector in json_target_key and keep /production/config in value. They do not return the selected password. To create other variables from the same remote secret, change key and json_target_key: Dots separate object members. Numeric segments select array elements, starting at 0. A secret whose root is an array can use 0.password to select the first element’s password. To select a key containing a literal dot, escape it with \.. JSON strings need an additional escape, so the request contains "database\\.password". A literal backslash is written as \\ in the selector and \\\\ inside a JSON string. Backslashes before other characters remain literal for compatibility with existing key names. Other characters, including *, ?, #, @, and |, are literal key characters. Filters, wildcards, and transformations are not evaluated. Nested selection is explicit: database.credentials.password selects the nested member, while database\.password selects the literal key database.password, even when both kinds of key exist in the same document.

Update or clear the selection

Use PUT /variable/{variableId} to replace the selector. This request changes DATABASE_PASSWORD to select secret-account from the same remote secret:
Include the existing selector in every update that should preserve it. Omitting json_target_key or setting it to null clears the previous selection and restores whole-secret behavior. To clear it explicitly:
Omitting the selector or sending null on creation also selects the complete remote secret. An empty string is rejected.

Validation and compatibility

A non-null selector must:
  • Contain between 1 and 256 Unicode characters.
  • Have no empty path segments, such as .password, database., or database..password.
  • Have no control characters or leading or trailing whitespace.
  • Have no trailing unescaped backslash.
json_target_key applies only to external secrets injected as environment variables (EXTERNAL_SECRET). It cannot be combined with mount_path, used with a file external secret (FILE_EXTERNAL_SECRET), or used for ordinary variables or built-in secrets. q-core validates the selector syntax and the remote secret reference without reading the secret value. If the selected property does not exist, ESO reports the error during deployment. Changing the remote JSON still requires a redeploy before the running service receives the new value. Environment and service clones preserve the selector. Existing variables and old deployment snapshots without this field keep whole-secret behavior. CSV imports do not set a selector. The Terraform exporter includes json_target_key when a selector is set. Applying the exported configuration requires a Terraform provider version that accepts this field. Deploy the engine update before enabling JSON selection in the API.

Using the Qovery CLI

  • Create an external secret:
To create an external secret as a file, just add the --mount-path="path" parameter
  • Update an external secret:
You can’t update the mount path of an external secret (same behavior as basic environment variable)
  • Delete an external secret:

Using external secrets with Terraform services

To pass an external secret to Terraform, first create the external secret (in the External secrets tab of the service, or at the environment, project, or organization level), then reference its key from a Terraform variable with the {{ SECRET_KEY }} syntax.
Terraform service external secret
You can use the reference:
  • In the Terraform variables section, as the value of a variable, for example db_password = {{ DB_PASSWORD }}
  • In a .tfvars file from your repository, for example db_password = "{{ DB_PASSWORD }}"
  • Inside a longer value, for example database_url = "postgres://app:{{ DB_PASSWORD }}@db.internal:5432/app"
Qovery never reads the secret value. The reference is resolved inside your cluster when the Terraform job starts, from the secret synced by the External Secrets Operator, and Terraform receives the value as a -var argument.
  • External secrets mounted as a file can’t be referenced from a Terraform variable.
  • References are not resolved in the Terraform arguments section.
  • Terraform prints variable values in its plan and apply output unless the variable is declared with sensitive = true in your module. Mark the variables that receive secrets as sensitive.
  • sensitive = true only redacts Terraform’s output: resource attributes derived from the secret can still be stored in the Terraform state. Protect your state backend accordingly.
An external secret whose key follows the pattern TF_VAR_${your_variable} is still read by Terraform as your_variable, as long as no Terraform variable or .tfvars entry sets your_variable: those take precedence over TF_VAR_* environment variables. Prefer the {{ SECRET_KEY }} reference, which works with any key name and is not overridden.