Key Vault
Secrets
Microsoft.KeyVault/vaults/secrets
- Control plane
- Supported
- Data plane
- Emulated
- API versions
- 20 2 stable
- Ships in
- Plugin Microsoft.KeyVault 2026.11.01
- Plan
- Starter and above
Data as of 2026-11-20
API versions
The API versions Locally supports for Microsoft.KeyVault/vaults/secrets.
| API version | Status | Control plane | Data plane |
|---|---|---|---|
| 2026-10-01-preview | preview | Supported | Emulated |
| 2026-06-01-preview | preview | Supported | Emulated |
| 2026-05-15 | stable | Supported | Emulated |
| 2026-03-01-preview | preview | Supported | Emulated |
| 2026-02-01 | stable | Supported | Emulated |
| 2025-05-01 | deprecated | Supported | Emulated |
| 2024-12-01-preview | deprecated | Supported | Emulated |
| 2024-11-01 | deprecated | Supported | Emulated |
| 2024-04-01-preview | deprecated | Supported | Emulated |
| 2023-07-01 | deprecated | Supported | Emulated |
| 2023-02-01 | deprecated | Supported | Emulated |
| 2022-11-01 | deprecated | Supported | Emulated |
| 2022-07-01 | deprecated | Supported | Emulated |
| 2022-02-01-preview | deprecated | Supported | Emulated |
| 2021-11-01-preview | deprecated | Supported | Emulated |
| 2021-10-01 | deprecated | Supported | Emulated |
| 2021-06-01-preview | deprecated | Supported | Emulated |
| 2021-04-01-preview | deprecated | Supported | Emulated |
| 2019-09-01 | deprecated | Supported | Emulated |
| 2016-10-01 | deprecated | Supported | Emulated |
Note: This is generated from the latest version of the plugin (2026.11.01) as of 2026-11-20, and may differ in older versions. We aim to keep this information accurate and up to date; if you find something we're missing, then please let us know.
Features
- Set, get, update, delete and list, including listing a secret's versions.
- Attributes: reading a disabled secret is refused with
SecretDisabled, whilenbfandexpdon't block a read, as in Azure. - Soft-delete: get, list, recover and purge deleted secrets, with purge protection enforced.
- Automatic purging once a deleted secret's
scheduledPurgeDatepasses. - Backup and restore
- Role assignments on a single secret are honoured, as well as those inherited from the vault, resource group or subscription.
- Event Grid events:
SecretNewVersionCreated,SecretNearExpiryandSecretExpired.
Examples
Runnable examples from the examples library.
Reading Key Vault secrets from App Service
Deploy a TypeScript app to App Service with Terraform that reads a Key Vault secret two ways, through a Key Vault reference and directly with the SDK, using a managed identity, then rotate the secret to see when each one picks up the new version.
Deploy a Key Vault Secret to Locally using an ARM Template
Provisions a Key Vault and a Secret stored within it, into a Resource Group of your choosing.
Deploy a Key Vault Secret to Locally using a Bicep Template
Provisions a Key Vault and a Secret stored within it, into a Resource Group of your choosing.
Deploy a Key Vault Secret to Locally using Terraform and the Azure/azapi provider
Provisions a Resource Group containing a Key Vault and a Secret stored within it.
Deploy a Key Vault Secret to Locally using Terraform and the hashicorp/azurerm provider
Provisions a Resource Group containing a Key Vault and a Secret stored within it.
Deploy a Key Vault Secret to Locally using OpenTofu and the Azure/azapi provider
Provisions a Resource Group containing a Key Vault and a Secret stored within it.
Deploy a Key Vault Secret to Locally using OpenTofu and the opentofu/azurerm provider
Provisions a Resource Group containing a Key Vault and a Secret stored within it.