Deleting and restoring
Deleting a secret removes nothing immediately. It moves the secret into a recovery window and returnsdeleted_at and scheduled_purge_at. Once
scheduled_purge_at passes, the secret and every version are removed for good.
- Console
- API
- CLI
- Go
Open the secret from Secrets and use Delete secret, in the Danger
zone on its Settings tab. The dialog takes a Recovery window
(days) and will not confirm until you type the secret’s name back.
86400 – 2592000, default 604800
1 to 30 days, defaulting to 7. Set it at creation to give a secret its own
default, or pass it on the delete call to override it for that deletion.
GET /v1/secrets/{id}still describes it, so you can see the purge date.- Reading or writing the value is refused with
409 SECRET_DELETED. - Updating metadata is refused the same way.
- It is hidden from
GET /v1/secretsunless you passinclude_deleted=true.
- Console
- API
- CLI
- Go
A secret in the window shows Restore in its header, in place of Put
New Value.
Deleting frees the secret’s quota straight away, so you can create a
replacement without waiting out the window. Restoring has to take that quota
back, which means a restore can fail with
403 QUOTA_EXCEEDED if your
account has since filled the slot. Free one before restoring.