Skip to content

Conversation

@houk-ms
Copy link
Contributor

@houk-ms houk-ms commented Apr 23, 2021

Description

This PR supports the soft-delete feature for managed-HSM

The new added commands and parameters include

  • az keyvault show-deleted command
  • --resource-type hsm parameter for command az keyvault list-deleted
  • --hsm-name parameter for command az keyvault purge

The following command's behavior changes

  • az keyvault delete --hsm-name

It soft deletes a mhsm not permanently delete it. For permanently delete casse we provide the command az keyvault purge --hsm-name.

Testing Guide

History 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 feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@houk-ms houk-ms added the KeyVault az keyvault label Apr 23, 2021
@houk-ms houk-ms self-assigned this Apr 23, 2021
try:
result = poller.result()
except ClientException as client_exception:
except (ClientException, HttpResponseError) as client_exception:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will handle the case in anothor PR #17833

raise CLIError('No deleted Vault or HSM was found with name ' + resource_name)

if 'keyvault purge' not in cmd.name:
if 'keyvault purge' not in cmd.name and 'keyvault show-deleted' not in cmd.name:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two comands won't need resource-group parameter

@houk-ms houk-ms changed the title [KeyVault] BREAKING CHANGE: Support soft-delete feature for managed-HSM. keyvault delete --hsm-name will soft delete not permanently delete a HSM. [KeyVault] BREAKING CHANGE: Support soft-delete feature for managed-HSM. keyvault delete --hsm-name will soft delete not permanently delete a MHSM. Apr 23, 2021


class KeyVaultHSMMgmtScenarioTest(ScenarioTest):
@record_only()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this test can be lively runned.

@yungezz
Copy link
Member

yungezz commented Apr 25, 2021

this is not a CLI interface breaking, but service behavior change, right?

@houk-ms
Copy link
Contributor Author

houk-ms commented Apr 25, 2021

this is not a CLI interface breaking, but service behavior change, right?

Yes, this is a service side breaking change.

@houk-ms
Copy link
Contributor Author

houk-ms commented Apr 26, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Member

@qwordy qwordy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve servicefabric

@qwordy
Copy link
Member

qwordy commented Apr 26, 2021

It soft deletes a mhsm not permanently delete it.

It is not a correct English sentence.

@houk-ms houk-ms changed the title [KeyVault] BREAKING CHANGE: Support soft-delete feature for managed-HSM. keyvault delete --hsm-name will soft delete not permanently delete a MHSM. [KeyVault] BREAKING CHANGE: Support soft-delete feature for managed-HSM. keyvault delete --hsm-name will perform soft delete on a MHSM. Apr 26, 2021
@houk-ms houk-ms merged commit 2c69350 into Azure:dev Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

KeyVault az keyvault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants