Skip to main content
After you fetch Google Cloud secrets into an environment, reference them the same way as other external secrets in headers, query params, body, and auth fields.
Syntax is {{<row-name>.<secret-id>}} (for example, {{staging.api-key}}).

Variable syntax

For GCP, each environment row Name is the namespace. Under it, Bruno nests every secret ID from that project. Recommended syntax (v4+):
If the secret payload is JSON, access a field with a sub-key:
Examples For example, with a row named db_pass and a GCP secret ID gcp-sandbox-key-1, use {{db_pass.gcp-sandbox-key-1}} in the request body: Using GCP secrets in a request Legacy syntax (deprecated):

Using secrets in scripts

Access secrets from Pre-request and Post-request scripts with bru.getSecretVar():
Make sure the GCP Secrets Manager account is configured and secrets are fetched before using them in scripts. Names must match the environment row alias and GCP secret IDs exactly.

Using secrets with Bruno CLI

To learn more about using secrets with Bruno CLI, see the CLI Secret Managers documentation.