You know the awkward dance of managing secrets in CI/CD. Too many environment variables. Too many keys living longer than anyone remembers. One misstep and you are posting credentials to a log file. Bitwarden and Cloud Run together promise to fix that, but only if you wire them the right way.
Bitwarden handles encrypted password and secret management controlled by identity, role, and vaults. Google Cloud Run offers container execution without the ops tax of maintaining servers. Pairing them lets you inject secrets securely at runtime instead of baking them into images or committing them to source. That sounds good, but the devil is in the lifecycle.
The workflow looks simple once you cut through the haze. Use Bitwarden as the single source of truth for secrets. Your build system, authenticated via OIDC or service account, fetches an access token just long enough to pull the secrets needed by Cloud Run. Those values flow through encrypted environment variables or a secure volume, live only in memory during container startup, and die with the process. No artifact ever sees plaintext credentials. No human ever has to copy and paste passwords again.
When configuring Bitwarden Cloud Run, focus on three things: identity, scope, and rotation. Identity comes first. Map each Cloud Run service to a unique identity, not a shared one, using IAM and service tokens. Scope ensures that only specific containers can access specific vaults. Rotation keeps your credentials fresh. Set Bitwarden policies so tokens expire automatically, forcing short-lived trust that mirrors Cloud Run’s ephemeral nature.
If your logs ever show “unauthorized” pull errors, it usually means the Bitwarden API key wasn’t refreshed when the Cloud Run revision deployed. Automate that refresh as part of your deployment step. It’s a thirty-second fix that saves hours of debugging.