-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix Get-AzureRmVmssVMDiskEncryption for data disk #4731
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
return EncryptionStatus.Unknown; | ||
if (encryptionSettings.EncryptionOperation.Equals(AzureDiskEncryptionExtensionConstants.enableEncryptionOperation, StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
return EncryptionStatus.Encrypted; |
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.
And extension provisioning state should have succeeded
@@ -92,7 +92,10 @@ public class SetAzureVmssDiskEncryptionExtensionCommand : VirtualMachineScaleSet | |||
Mandatory = false, | |||
ValueFromPipelineByPropertyName = true, | |||
HelpMessage = "Type of the volume (OS or Data) to perform encryption operation")] | |||
[ValidateSet("OS", "Data", "All")] | |||
[ValidateSet( | |||
AzureDiskEncryptionExtensionContext.VolumeTypeOS, |
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.
Will this break / change the existing customer scripts ?
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.
These are constants with the same string values as the validateset above, which should have no impact:https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/AzureDiskEncryptionExtensionContext.cs#L33
@hyonholee This looks fine to me, once Sudhakar has signed off, looks like there may be some additional necessary validations |
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines