Deleting a Secret in Vault

Delete a secret in vault.

  • Note

    When a vault secret is pending deletion, resources or services that rely on that secret immediately become inaccessible. The secret also can't be rotated or otherwise updated. When the secret is deleted, it is are irreversibly destroyed. If you want to restore the use of a secret before it is permanently deleted, you can cancel its deletion.

    1. Open the navigation menu, click Identity & Security, and then click Vault.
    2. Under List scope, select a compartment that contains the secret that you want to delete.
    3. On the Vaults page, click the name of the vault to open its details page.

    4. Click Delete Secret.
    5. Under Resources, click Secrets,and then click the name of the secret to open its details.
    6. Click Delete Secret.
    7. Confirm that you want to delete the vault secret by typing the secret name in the text box.
    8. Schedule when you want Vault to delete the secret. By default, the service schedules secrets for deletion 30 days from the current date and time. You can set a range between 1 day and 30 days.
    9. Click Delete Secret. If needed, you can restore use of the vault secret and access to resources and services that use the contents of that secret by clicking Cancel Deletion on the secret details page and making the secret version current again.
  • Caution

    When a secret is pending deletion, resources or services that rely on that secret immediately become inaccessible. The secret also can't be rotated or otherwise updated. When the secret is deleted, secret contents are irreversibly destroyed. If you want to restore the use of a secret before it is permanently deleted, you can cancel its deletion.

    Open a command prompt and run oci vault secret schedule-secret-deletion to schedule a secret's deletion:

    oci vault secret schedule-secret-deletion --secret-id <target_secret_id> --time-of-deletion <time_in_rfc3339_format>

    For example:

    
    oci vault secret schedule-secret-deletion --secret-id ocid1.vaultsecret.oc1.iad.exampleaz5qacpqahuecvbjqzql4qmpbrtd7pprafhivcfik6wuitexample  --time-of-deletion 2020-04-30T10:00:00Z

    By default, the service schedules secrets for deletion 30 days from the current date and time. You can set a range between 1 day and 30 days.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ScheduleSecretDeletion operation to schedule deletion of a secret.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.