[KeyVault] az keyvault secret copy: Add command to copy secrets between vaults#32751
Open
jcassanji-southworks wants to merge 43 commits into
Open
Conversation
…test_keyvault_commands.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…test_keyvault_commands.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…github.com/jcassanji-southworks/azure-cli into jcassanji-southworks/feature-keyvault-copy
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…true and add test for default behavior
…github.com/jcassanji-southworks/azure-cli into jcassanji-southworks/feature-keyvault-copy
…gs and update dummy secret validation call
…ion and refactor copy_secret to utilize it
…/feature-keyvault-copy
❌AzureCLI-FullTest
|
az keyvault secret copy: Add command to copy secrets between vaults
…r missing secrets
…ional client configurations
… location parameter for destination Key Vault creation
Refactor credential retrieval logic in Key Vault client.
Refactor KeyVault copy tests to improve structure and clarity, including renaming test classes and methods for better readability. Enhance test coverage for secret copy functionality, including overwrite behavior and error cases.
Member
|
@jcassanji-southworks Please check the tests are failing |
Contributor
Author
Done |
Contributor
Author
|
@yonzhan Could you please adjust the milestone for this feature to add it to the backlog? |
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.
Related command
az keyvault secret copyDescription
This PR introduces a new command
az keyvault secret copyto simplify the process of copying secrets from one Key Vault to another. It supports copying individual secrets or all secrets in bulk, with options to control overwrite behavior and preserve metadata.Motivation and Benefits
Currently, users needing to migrate or replicate secrets between Key Vaults (e.g., promoting from Dev to Prod, or replicating for DR) must write complex scripts. This new command standardizes this workflow into a single CLI operation.
Implementation Details
keyvault secretgroup.azure-keyvault-secretstrack2 SDK.Testing Guide
Copy a single secret:
Copy all secrets:
Force copy (overwrite existing):
History Notes
[KeyVault]
az keyvault secret copy: Add new command to copy secrets between Key VaultsThis 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.