Repository navigation
[Key Vault] az keyvault create: Support new Managed HSM SKUs Standard_B1v2, Standard_B5v2, Standard_B10v2, Standard_B15v2, Standard_B20v2 - #34234
Open
neerjagangwar wants to merge 9 commits into
Conversation
…ged HSM SKUs
Upgrades `azure-mgmt-keyvault` 14.0.1 -> 14.1.0 so all `az keyvault`
control-plane operations target ARM API version `2026-05-15`.
API version `2026-05-15` adds five new Managed HSM SKUs:
`Standard_B1v2`, `Standard_B5v2`, `Standard_B10v2`, `Standard_B15v2`
and `Standard_B20v2`. These cannot be used today because the CLI is
pinned to `2026-02-01`, where the resource provider rejects them.
Changes:
- `setup.py` + `requirements.py3.{Darwin,Linux,windows}.txt`:
`azure-mgmt-keyvault==14.1.0` (its default api-version is `2026-05-15`).
`MGMT_KEYVAULT` is unpinned in `AZURE_API_PROFILES`, so the client rides
the SDK default and no profile change is needed.
- `keyvault/_params.py`: add the five new SKUs to the `az keyvault create`
`--sku` help text, which still listed only the pre-existing five.
No code change is needed in `create_hsm`: `sku_family` is derived as
`sku.split('_')[1][0]`, which yields `B` for all five new SKU names.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
…ects in recordings Clear contact fields (phones, job title, office location, address) on Graph user objects and replace the signed-in user's names learned from /me with mock values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
microsoft-github-policy-service
Bot
requested review from
Yu Chen (jsntcy),
ZelinWang (wangzelin007) and
Yong Zhang (yonzhan)
October 16, 2026 14:27
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved playback incompatibilities and sanitizer correctness gaps can break tests and retain personal names.
3 open findings
What changed in this PR
Updates Key Vault management support for the new Managed HSM SKUs and improves test-recording sanitization.
Changes:
- Bumps
azure-mgmt-keyvaultto 14.1.0 and expands SKU help. - Supplies the required SKU family when Service Fabric creates a vault.
- Refreshes recordings and adds default Graph profile sanitization.
| File | Description |
|---|---|
src/azure-cli/setup.py |
Updates the Key Vault SDK dependency. |
src/azure-cli/requirements.py3.windows.txt |
Updates the Windows dependency pin. |
src/azure-cli/requirements.py3.Linux.txt |
Updates the Linux dependency pin. |
src/azure-cli/requirements.py3.Darwin.txt |
Updates the macOS dependency pin. |
src/azure-cli/azure/cli/command_modules/servicefabric/custom.py |
Adds the required vault SKU family. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_mhsm_private_link_resource.yaml |
Refreshes HSM private-link recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_secret_soft_delete.yaml |
Refreshes secret soft-delete recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_public_network_access.yaml |
Refreshes network-access recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_private_link_resource.yaml |
Refreshes vault private-link recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_key_rotation.yaml |
Refreshes key-rotation recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_hsm_key_random.yaml |
Refreshes HSM random-data recording. |
src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/recordings/test_keyvault_certificate_soft_delete.yaml |
Refreshes certificate soft-delete recording. |
src/azure-cli/azure/cli/command_modules/keyvault/_params.py |
Lists the new HSM SKUs in help. |
src/azure-cli-testsdk/azure/cli/testsdk/utilities.py |
Adds Graph user-profile sanitization. |
src/azure-cli-testsdk/azure/cli/testsdk/base.py |
Registers the sanitizer by default. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…project.toml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Only replace decoded JSON string values that exactly match a learned name, so short names cannot corrupt keys/URLs; recognize all built-in cloud Graph hosts; add unit tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
Api-version-only updates for Microsoft.KeyVault requests in tests that were not re-recorded, following the approach of Azure#33895. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 272efcb4-b315-43c3-89c0-03a3eac4fa39
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
azure-mgmt-keyvault 14.1.0 regressed the 14.0.1 fix (azure-sdk-for-python#45955): vaults.list() next-link pages use the client api-version, which ARM /resources rejects. Create the client used for these lookups with api_version=2015-11-01 until a fixed SDK ships. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c7bf1cdb-c782-4d93-bea0-7026027f9c87
…customer_managed_key recording These requests come from az resource update, which resolves 2026-02-01 from the recorded provider metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c7bf1cdb-c782-4d93-bea0-7026027f9c87
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Member
Author
|
/azp run |
|
Commenter does not have sufficient privileges for PR 34234 in repo Azure/azure-cli |
Contributor
|
@Azure/act-identity-squad can you help review this keyVault PR ? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


🤖 PR Validation — ️✔️ All clear
Related command
az keyvault create --hsm-name ... --sku ...az keyvaultcontrol-plane commandsDescription
Bump
azure-mgmt-keyvaultfrom 14.0.1 to 14.1.0. This moves the Key Vault control plane to API version 2026-05-15.Customer impact
az keyvault create --hsm-nameaccepts the new Managed HSM SKUsStandard_B1v2,Standard_B5v2,Standard_B10v2,Standard_B15v2andStandard_B20v2. The service rejects these on the older API version.--skuhelp text lists the new SKUs. The default is stillStandard_B1.Files changed
setup.py,requirements.py3.{Darwin,Linux,windows}.txtazure-mgmt-keyvault==14.1.0keyvault/_params.py--skuhelp textservicefabric/custom.pyfamily='A'when creating a Key Vaultkeyvault/_validators.py,servicefabric/custom.py,servicefabric/_client_factory.py2015-11-01for thevaults.list()lookups (see below)azure-cli-testsdk/.../utilities.py,base.pyMSGraphUserProfileReplacerrecording processor (see below)ServiceFabric fix:
familyis required by the SDK in both 14.0.1 and 14.1.0. Without it, creating a Key Vault fails client-side before any request is sent. The Key Vault module already passes it.Test SDK: sanitize Microsoft Graph user profiles. Tests that call
az ad signed-in-user showor resolve assignees record the signed-in user's Graph profile.EmailAddressReplaceronly masks the email, so names, phone numbers, job title and office location were being committed in recordings. The new processor runs by default for everyScenarioTest:/me, withTest User/Test/Userin all later responses.Workaround for an azure-mgmt-keyvault 14.1.0 regression.
vaults.list()calls ARM/resources. Page 1 uses2015-11-01, but in 14.1.0 the next-link pages use the client's api-version (2026-05-15), which ARM rejects withInvalidApiVersionParameter. 14.0.1 had fixed this (Azure/azure-sdk-for-python#45955), but the 14.1.0 regeneration dropped the fix. The CLI creates the client for these lookups withapi_version='2015-11-01'. This affectsaz keyvault ... --namewithout-g, the default CVM release-policy lookup, andaz sf cluster create --secret-identifier. The workaround will be removed once a fixed SDK ships.References: Azure SDK Release Plan 36121. Spec PR: Azure/azure-rest-api-specs#46950.
Testing Guide
Recordings: 37 cassettes were re-recorded live against 2026-05-15, not hand-edited. All of them pass in playback, and none of them references 2026-02-01. Every cassette went through the new profile sanitizer and
azdev scan.Not re-recorded. These keep their existing recordings. Only the api-version of their
Microsoft.KeyVaultrequest URIs was changed to2026-05-15; response bodies are unchanged. Requests made throughaz resource updatekeep the version they resolved from the recorded provider metadata. Live re-recording was blocked for these reasons:eastus2euapAccountKindNotSupported)ADEWithManagedIdentityneeds allow-listingUpdateGatewayInProgressHistory Notes
[Key Vault]
az keyvault create: Support new Managed HSM SKUsStandard_B1v2,Standard_B5v2,Standard_B10v2,Standard_B15v2,Standard_B20v2[ServiceFabric]
az sf cluster create,az sf application certificate add: Fix creating a new Key Vault failing due to missing SKU familyThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.