Skip to content

New Cmdlets for Management.Sql that supports Managed instance key and… #9222

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

Merged
merged 7 commits into from
Jun 6, 2019

Conversation

nivimsft
Copy link
Contributor

… managed instance TDE protector management

Description

New Cmdlets for Management.Sql to allow customers to add TDE keys and set TDE protector for managed instances

  • Add-AzureRmSqlManagedInstanceKeyVaultKey
  • Get-AzureRmSqlManagedInstanceKeyVaultKey
  • Remove-AzureRmSqlManagedInstanceKeyVaultKey
  • Get-AzureRmSqlManagedInstanceTransparentDataEncryptionProtector
  • Set-AzureRmSqlManagedInstanceTransparentDataEncryptionProtector

cmdlet design review

Checklist

@MiYanni
Copy link
Contributor

MiYanni commented May 16, 2019

@nivimsft There are merge conflicts to resolve.

@markcowl
Copy link
Member

@nivimsft There are merge conflicts, please pull the latest, fix the conflicts, and update the PR

@niander
Copy link
Member

niander commented May 30, 2019

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@markcowl
Copy link
Member

/azp run azure-powershell - windows-powershell

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@markcowl
Copy link
Member

markcowl commented Jun 3, 2019

@jaredmoo @petrajkogit can you sign off on the requested changes in your previous review?

- clean up commented logic.
- remove irrelavent comments.
@markcowl
Copy link
Member

markcowl commented Jun 4, 2019

@jaredmoo Please sign off on the review changes

jaredmoo
jaredmoo previously approved these changes Jun 5, 2019
Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

An issue and a question

Position = 1,
HelpMessage = "The instance name")]
[ValidateNotNullOrEmpty]
public string InstanceName { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

This probably needs to be called Name - if the object this names matches the cmdlet noun (i.e ManagedServiceInstance, then it should be called 'Name' - it is OK to have an alias to this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think Name could be confusing in this context, it could mean ManagedInstanceTransparentDataEncryptionProtector Name or ManagedInstance Name. Hence I think it is important to use InstanceName instead of just Name

/// Defines the Remove-AzureRmSqlManagedInstanceKeyVaultKey cmdlet
/// </summary>
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlInstanceKeyVaultKey", SupportsShouldProcess = true, DefaultParameterSetName = DefaultParameterSet)]
[OutputType(typeof(AzureRmSqlManagedInstanceKeyVaultKeyModel))]
Copy link
Member

Choose a reason for hiding this comment

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

Generally, remove cmdlets return nothing if successful. Is this pattern followed in other Remove cmdlets in Sql?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I have followed the pattern in the released cmdlet for sql server as we want to keep the user experience same for sql server and managed instance. The corresponding cmdlet for sql server key vault key returns the deleted key and remove key vault key cmdlet also returns deleted key.

@markcowl
Copy link
Member

markcowl commented Jun 5, 2019

@nivimsft Please address comments/questions

@nivimsft
Copy link
Contributor Author

nivimsft commented Jun 5, 2019

@nivimsft Please address comments/questions

Hi @markcowl, I have addressed your comments. Please take a look :)

@markcowl markcowl merged commit 567b700 into Azure:master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants