Secrets¶
Secrets hold the values your workloads need at run time: passwords, API keys, registry credentials, TLS certificates. They are stored encrypted, delivered into your tenant, and referenced by name from apps and scheduled jobs.
| Kind | Use |
|---|---|
| Generic | Key-value pairs. Reference a key from an environment variable. |
| Registry credentials | Server, user name and password for a private image registry. Select it as an image pull secret. |
| TLS | A certificate and its private key. |
Versions¶
Every change to a secret creates a new version; the newest one is what workloads read.
| Action | Effect |
|---|---|
| Add a version | New values become current. |
| Rotate | Replaces the entries you pick with generated values, as a new version. |
| Restore | Makes an older version's content current again, as a new version. |
| Disable or enable a version | A disabled version cannot be restored or pinned until it is enabled. |
| Destroy a version | Removes its content for good. The current version and pinned versions are refused. |
| Pin a version | Creates a copy named <secret>-v<version> that stays on that version, for a workload that must not follow changes. |
A secret also carries a description, labels, how many versions to keep, and an optional rotation interval after which the console flags it as due.
Values are write-only¶
The console and the API never list values. Reveal shows one value in the clear, on request, and every reveal is recorded in the audit log (the value itself is not).
Changing a secret that is in use¶
Apps read a secret when a revision starts, so a running app keeps the old values until its next revision. The secret's page lists the apps still on older values and can redeploy them; a secret can also be set to redeploy its consumers on every change.
A secret cannot be deleted while an app still refers to it; the error names the apps. Only secrets you created can be changed or deleted. The ones the platform keeps in your tenant, such as database credentials, are managed for you.
Permissions¶
Viewers can see that a secret exists, never its values. Creating and changing secrets, revealing a value and deleting are separate permissions that editors hold by default, and each can be granted for some secrets only.
Terraform¶
# A secret in the tenant's namespace. Values are write-only: they are stored in
# the Terraform state but never read back from the platform.
variable "database_password" {
type = string
sensitive = true
default = "change-me"
}
resource "rso_secret" "app" {
name = "tf-example-app"
data = {
DATABASE_PASSWORD = var.database_password
API_BASE_URL = "https://api.example.com"
}
}