Home/Refreshers/Somewhere to keep secrets that rotates them: refresher
Somewhere to keep secrets that rotates them
A managed store with scheduled rotation, a record of every read, and a way to take access away.
Remember
- An application needs a secret: read when it connects, never baked in.
- It asks the secrets store: using its own identity.
- The read is recorded: who, which secret, when.
- A new value arrives on schedule: generated on AWS, a reminder on Google Cloud.
| Platform | Uses | The part that catches people |
|---|---|---|
| AWS | Secrets Manager with a rotation function | The value never passes through Terraform, so it never lands in state. |
| Azure | Key Vault with role-based access | Purge protection cannot be switched off, and a deleted vault's name stays taken until its retention ends. |
| Google Cloud | Secret Manager with versions and conditional access | Terraform creates the secret, never its value. |
| Oracle Cloud | OCI Vault with policies scoped to one vault | OCI answers a caller without permission with 404, the same as for a name that does not exist. |
Run the quick start
| Download providers | terraform init |
| Preview | terraform plan |
| Apply | terraform apply |
Watch out
- A secret that never changes is a secret that stays leaked.
- Taking access away is part of the design.
Check it worked
Rotate the secret, or add a new version. The application uses the new value on its next read, with no redeploy.