Original study notes for cloud certification exams — Google Cloud first, more clouds in build.

Secret Manager Study Notes

Secret Manager is a secure, central store for sensitive values such as API keys, passwords, tokens, and certificates. Applications fetch secret values at runtime through the API instead of keeping them in code, configuration files, or environment variables checked into source control.

Exam tip: Exam scenarios about leaked passwords in code are solved by moving the value to Secret Manager and granting one service account accessor rights.

Key facts

What the exam expects you to know

Secret Manager vs Cloud KMS: when to use which

Use Secret Manager to store a value your application must retrieve and use directly, like a database password or a third-party API token. Use Cloud KMS to hold encryption keys that encrypt and decrypt data, where the service performs cryptographic operations and key material is never handed back to callers. A common architecture uses both: Secret Manager stores the secret, and a CMEK key from KMS encrypts the storage behind it. On exams, 'application needs this password at runtime' means Secret Manager; 'encrypt data with a managed key' means KMS. See also the Cloud KMS notes.

Useful gcloud commands

gcloud secrets create db-password --replication-policy=automatic
gcloud secrets versions add db-password --data-file=password.txt
gcloud secrets versions access latest --secret=db-password
gcloud secrets add-iam-policy-binding db-password --member=serviceAccount:app@PROJECT_ID.iam.gserviceaccount.com --role=roles/secretmanager.secretAccessor

Common exam traps

Frequently asked questions

How does secret rotation work in Secret Manager?

You can set a rotation period that publishes a message to a Pub/Sub topic when rotation is due. A subscriber, often a Cloud Function, creates a new credential with the target system, adds it as a new secret version, and updates clients. Old versions stay available briefly for safe rollback.

Can a secret be accessed from another project?

Yes, if the identity in the other project is granted a role such as Secret Accessor on that specific secret. Access is controlled by the secret's own IAM policy, not by project boundaries alone. Cross-project grants should be narrow, because the caller can then read every enabled version unless conditions limit it.

What happens when I disable a secret version?

A disabled version can no longer be accessed by any caller, but its material is retained and it can be re-enabled. A destroyed version is permanently deleted and cannot be recovered. Disabling is the safe first step during an incident, while destroying is the final cleanup after rotation is confirmed.

Study aid disclaimer: Cloud Cert Notes is an independent educational study aid. It is not affiliated with, endorsed by, or sponsored by Google, Microsoft, Amazon, Oracle, or Alibaba. Google Cloud, Associate Cloud Engineer, and Cloud Digital Leader are trademarks of Google LLC; all other certification names and product names are trademarks of their respective owners. Always confirm service details against the official provider documentation before sitting an exam.