-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Conversation
src/Sql/Sql.Test/ScenarioTests/ManagedInstanceProtectorTests.ps1
Outdated
Show resolved
Hide resolved
@nivimsft There are merge conflicts to resolve. |
@nivimsft There are merge conflicts, please pull the latest, fix the conflicts, and update the PR |
… managed instance TDE protector management
3c8bae5
to
6f00db9
Compare
/azp run azure-powershell - powershell-core |
Azure Pipelines successfully started running 1 pipeline(s). |
Reviving old server tests
/azp run azure-powershell - windows-powershell |
Azure Pipelines successfully started running 1 pipeline(s). |
@jaredmoo @petrajkogit can you sign off on the requested changes in your previous review? |
src/Sql/Sql.Test/ScenarioTests/ManagedInstanceKeyVaultKeyTests.cs
Outdated
Show resolved
Hide resolved
src/Sql/Sql.Test/ScenarioTests/ManagedInstanceProtectorTests.cs
Outdated
Show resolved
Hide resolved
- clean up commented logic. - remove irrelavent comments.
@jaredmoo Please sign off on the review changes |
src/Sql/Sql/TransparentDataEncryption/Model/AzureRmSqlManagedInstanceKeyVaultKeyModel.cs
Show resolved
Hide resolved
src/Sql/Sql/TransparentDataEncryption/Model/ManagedInstanceKeyHelper.cs
Outdated
Show resolved
Hide resolved
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.
An issue and a question
Position = 1, | ||
HelpMessage = "The instance name")] | ||
[ValidateNotNullOrEmpty] | ||
public string InstanceName { get; set; } |
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.
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
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 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))] |
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.
Generally, remove cmdlets return nothing if successful. Is this pattern followed in other Remove cmdlets in Sql?
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.
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.
@nivimsft Please address comments/questions |
… 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
cmdlet design review
Checklist
CONTRIBUTING.md
platyPS
module