Conversation
…t new default SKR policy
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| keyvault key create | cmd keyvault key create added parameter default_data_disk_policy |
||
| keyvault key import | cmd keyvault key import added parameter default_data_disk_policy |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new parameter --default-data-disk-policy to the az keyvault key create and az keyvault key import commands to support a new Secure Key Release (SKR) policy scenario for data disk encryption. This complements the existing --default-cvm-policy parameter which supports CVM disk encryption.
Key Changes:
- Added
--default-data-disk-policyparameter alongside existing--default-cvm-policy - Refactored
_fetch_default_cvm_policyto generic_fetch_default_release_policyfunction that supports both policy types - Implemented mutual exclusivity validation between the two default policy options
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| _params.py | Adds --default-data-disk-policy parameter definition for key create/import commands |
| _validators.py | Refactors policy fetching logic to support both CVM and data disk policy types, adds mutual exclusivity validation between policy options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/keyvault/_validators.py
Outdated
Show resolved
Hide resolved
| c.extra('default_data_disk_policy', action='store_true', | ||
| help='Use default policy under which the key can be exported for data disk encryption.') |
There was a problem hiding this comment.
The new --default-data-disk-policy parameter lacks test coverage. The existing test test_keyvault_hsm_key_release_policy only tests the --default-cvm-policy flag. Consider adding test cases for the new --default-data-disk-policy parameter to verify its functionality and ensure it generates the correct policy structure.
Related command
az keyvault create/importDescription
We previously supported
--default-cvm-policyfor key creation/import, but now we have a new scenario which requires new SKR policy for data disk encryption, so this PR adds new parameter--default-data-disk-policyTesting Guide
az keyvault key create --default-data-disk-policyHistory Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.