-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[KeyVault] Redesign HSM cmdlets #13599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/azp run azure-powershell - powershell-core |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| if (existingResource == null) | ||
| { | ||
| throw new Exception(string.Format("A managed HSM with name '{0}' in resource group '{1}' does not exist. Please use New-AzManagedHsm to create a managed HSM with these properties.", this.Name, this.ResourceGroupName)); | ||
| throw new Exception(string.Format("A managed HSM with name '{0}' in resource group '{1}' does not exist. Please use New-AzKeyVaultManagedHsm to create a managed HSM with these properties.", this.Name, this.ResourceGroupName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It better to use resource string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I'll fix it.
| } | ||
| } | ||
|
|
||
| private void NormalizeParameterSets() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can put NormalizeParameterSets into base class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish I could, but the logic of this method is slightly different in every cmdlet.
For example, some cmdlets have -ResourceId and some don't, some even have -HsmResourceId as well.
I'm afarid we won't get much benifit to write it in base class.
Description
According to our discussion with KeyVault team, here's the summary of the changes:
(I organized code changes in different commits. I suggest review them one by one.)
New-AzManagedHsmNew-AzKeyVaultManagedHsmAdd-AzKeyVaultKeyandAdd-AzManagedHsmKeyAdd-AzKeyVaultKeyGet-AzManagedHsmRoleDefinitionGet-AzKeyVaultRoleDefinitionBackup-AzManagedHsmBackup-AzKeyVaultBackup-AzManagedHsmSecurityDomainandRestore-AzManagedHsmSecurityDomainExport-AzKeyVaultSecurityDomainandImport-AzKeyVaultSecurityDomainChecklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added