Skip to content

Commit cc86dd2

Browse files
committed
release-2020-08-28
2 parents 61d1aaa + c83a521 commit cc86dd2

File tree

13 files changed

+3709
-456
lines changed

13 files changed

+3709
-456
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.6.1 - August 2020
2+
#### Az.Compute
3+
* Patched '-EncryptionAtHost' parameter in 'New-AzVm' to remove default value of false [#12776]
4+
15
## 4.6.0 - August 2020
26
#### Az.Accounts
37
* Loaded all public cloud environments when discovery endpoint doesn't return default AzureCloud or other public environments [#12633]

src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ public void TestLowPriorityVirtualMachine()
291291
TestRunner.RunTestScript("Test-LowPriorityVirtualMachine");
292292
}
293293

294+
[Fact]
295+
[Trait(Category.AcceptanceType, Category.CheckIn)]
296+
public void TestEncryptionAtHostVMNull()
297+
{
298+
TestRunner.RunTestScript("Test-EncryptionAtHostVMNull");
299+
}
300+
294301
[Fact]
295302
[Trait(Category.AcceptanceType, Category.CheckIn)]
296303
public void TestEncryptionAtHostVM()

src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3905,6 +3905,47 @@ function Test-LowPriorityVirtualMachine
39053905
}
39063906
}
39073907

3908+
<#
3909+
.SYNOPSIS
3910+
Test EncryptionAtHost Virtual Machine
3911+
#>
3912+
function Test-EncryptionAtHostVMNull
3913+
{
3914+
# Setup
3915+
$rgname = Get-ComputeTestResourceName
3916+
3917+
try
3918+
{
3919+
$loc = Get-ComputeVMLocation;
3920+
New-AzResourceGroup -Name $rgname -Location $loc -Force;
3921+
3922+
# VM Profile & Hardware
3923+
$vmsize = 'Standard_DS2_v2';
3924+
$vmname = 'vm' + $rgname;
3925+
[string]$domainNameLabel = "$vmname-$vmname".tolower();
3926+
3927+
$user = "Foo2";
3928+
$password = $PLACEHOLDER;
3929+
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
3930+
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
3931+
$computerName = 'test';
3932+
3933+
$vm = New-AzVM -ResourceGroupName $rgname -Name $vmname -Credential $cred -DomainNameLabel $domainNameLabel;
3934+
Assert-AreEqual $null $vm.SecurityProfile.encryptionathost
3935+
3936+
# Get VM
3937+
$vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname;
3938+
Assert-AreEqual $null $vm.SecurityProfile.encryptionAtHost
3939+
Assert-AreEqual $null $vm.encryptionAtHost
3940+
3941+
}
3942+
finally
3943+
{
3944+
# Cleanup
3945+
Clean-ResourceGroup $rgname
3946+
}
3947+
}
3948+
39083949
<#
39093950
.SYNOPSIS
39103951
Test EncryptionAtHost Virtual Machine

src/Compute/Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests/TestEncryptionAtHostVMNull.json

Lines changed: 3207 additions & 0 deletions
Large diffs are not rendered by default.

src/Compute/Compute/Az.Compute.psd1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 8/21/2020
6+
# Generated on: 8/28/2020
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '4.3.0'
15+
ModuleVersion = '4.3.1'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -205,10 +205,7 @@ PrivateData = @{
205205
# IconUri = ''
206206

207207
# ReleaseNotes of this module
208-
ReleaseNotes = '* Added ''-EncryptionAtHost'' parameter to ''New-AzVm'', ''New-AzVmss'', ''New-AzVMConfig'', ''New-AzVmssConfig'', ''Update-AzVM'', and ''Update-AzVmss''
209-
* Added ''SecurityProfile'' to ''Get-AzVM'' and ''Get-AzVmss'' return object
210-
* Added ''-InstanceView'' switch as optional parameter to ''Get-AzHostGroup''
211-
* Added new cmdlet ''Invoke-AzVmPatchAssessment'''
208+
ReleaseNotes = '* Patched ''-EncryptionAtHost'' parameter in ''New-AzVm'' to remove default value of false [#12776]'
212209

213210
# Prerelease string of this module
214211
# Prerelease = ''

src/Compute/Compute/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* Added the '-InstanceView' switch as optional parameter to Get-AzHostGroup
2727
* Added the '-HostGroupId' parameter to New-AzVm and New-AzVmss
2828

29+
## Version 4.3.1
30+
* Patched `-EncryptionAtHost` parameter in `New-AzVm` to remove default value of false [#12776]
31+
2932
## Version 4.3.0
3033
* Added `-EncryptionAtHost` parameter to `New-AzVm`, `New-AzVmss`, `New-AzVMConfig`, `New-AzVmssConfig`, `Update-AzVM`, and `Update-AzVmss`
3134
* Added `SecurityProfile` to `Get-AzVM` and `Get-AzVmss` return object

src/Compute/Compute/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
[assembly: ComVisible(false)]
2626
[assembly: CLSCompliant(false)]
2727
[assembly: Guid("91792853-487B-4DC2-BE6C-DD09A0A1BC10")]
28-
[assembly: AssemblyVersion("4.3.0")]
29-
[assembly: AssemblyFileVersion("4.3.0")]
28+
[assembly: AssemblyVersion("4.3.1")]
29+
[assembly: AssemblyFileVersion("4.3.1")]
3030
#if !SIGN
3131
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Compute.Test")]
3232
#endif

src/Compute/Compute/Strategies/ComputeRp/VirtualMachineScaleSetStrategy.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
8282
AdditionalCapabilities = ultraSSDEnabled ? new AdditionalCapabilities(true) : null,
8383
VirtualMachineProfile = new VirtualMachineScaleSetVMProfile
8484
{
85-
SecurityProfile = new SecurityProfile
86-
{
87-
EncryptionAtHost = encryptionAtHost
88-
},
85+
SecurityProfile = (encryptionAtHost == true) ? new SecurityProfile(encryptionAtHost) : null,
8986
OsProfile = new VirtualMachineScaleSetOSProfile
9087
{
9188
ComputerNamePrefix = name.Substring(0, Math.Min(name.Length, 9)),

src/Compute/Compute/Strategies/ComputeRp/VirtualMachineStrategy.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
5757
string priority,
5858
string evictionPolicy,
5959
double? maxPrice,
60-
bool? encryptionAtHostEnabled)
60+
bool encryptionAtHostPresent)
6161

6262
=> Strategy.CreateResourceConfig(
6363
resourceGroup: resourceGroup,
@@ -99,7 +99,7 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
9999
Priority = priority,
100100
EvictionPolicy = evictionPolicy,
101101
BillingProfile = (maxPrice == null) ? null : new BillingProfile(maxPrice),
102-
SecurityProfile = (encryptionAtHostEnabled == null) ? null : new SecurityProfile(encryptionAtHostEnabled)
102+
SecurityProfile = (encryptionAtHostPresent == true) ? new SecurityProfile(encryptionAtHostPresent) : null
103103
});
104104

105105
public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
@@ -120,7 +120,7 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
120120
string priority,
121121
string evictionPolicy,
122122
double? maxPrice,
123-
bool? encryptionAtHostEnabled
123+
bool encryptionAtHostPresent
124124
)
125125
=> Strategy.CreateResourceConfig(
126126
resourceGroup: resourceGroup,
@@ -159,10 +159,7 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
159159
Priority = priority,
160160
EvictionPolicy = evictionPolicy,
161161
BillingProfile = (maxPrice == null) ? null : new BillingProfile(maxPrice),
162-
SecurityProfile = new SecurityProfile
163-
{
164-
EncryptionAtHost = encryptionAtHostEnabled
165-
}
162+
SecurityProfile = (encryptionAtHostPresent == true) ? new SecurityProfile(encryptionAtHostPresent) : null
166163
});
167164
}
168165
}

src/Compute/Compute/VirtualMachine/Config/NewAzureVMConfigCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public class NewAzureVMConfigCommand : Microsoft.Azure.Commands.ResourceManager.
122122
Mandatory = false,
123123
ValueFromPipelineByPropertyName = false,
124124
HelpMessage = "EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself.")]
125-
public SwitchParameter EncryptionAtHost { get; set; } = false;
125+
public SwitchParameter EncryptionAtHost { get; set; }
126126

127127
protected override bool IsUsageMetricEnabled
128128
{

src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public class NewAzureVMCommand : VirtualMachineBaseCmdlet
258258
HelpMessage = "EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself.")]
259259
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = false,
260260
HelpMessage = "EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine. This will enable the encryption for all the disks including Resource/Temp disk at host itself.")]
261-
public SwitchParameter EncryptionAtHost { get; set; } = false;
261+
public SwitchParameter EncryptionAtHost { get; set; }
262262

263263
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
264264
HelpMessage = "The resource id of the dedicated host group, on which the customer wants their VM placed using automatic placement.",
@@ -404,7 +404,7 @@ public async Task<ResourceConfig<VirtualMachine>> CreateConfigAsync()
404404
priority: _cmdlet.Priority,
405405
evictionPolicy: _cmdlet.EvictionPolicy,
406406
maxPrice: _cmdlet.IsParameterBound(c => c.MaxPrice) ? _cmdlet.MaxPrice : (double?)null,
407-
encryptionAtHostEnabled: _cmdlet.EncryptionAtHost.IsPresent
407+
encryptionAtHostPresent: _cmdlet.EncryptionAtHost.IsPresent
408408
);
409409
}
410410
else
@@ -430,8 +430,8 @@ public async Task<ResourceConfig<VirtualMachine>> CreateConfigAsync()
430430
priority: _cmdlet.Priority,
431431
evictionPolicy: _cmdlet.EvictionPolicy,
432432
maxPrice: _cmdlet.IsParameterBound(c => c.MaxPrice) ? _cmdlet.MaxPrice : (double?)null,
433-
encryptionAtHostEnabled: _cmdlet.EncryptionAtHost.IsPresent
434-
);
433+
encryptionAtHostPresent: _cmdlet.EncryptionAtHost.IsPresent
434+
);
435435
}
436436
}
437437
}

tools/Az/Az.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '4.6.0'
15+
ModuleVersion = '4.6.1'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -63,7 +63,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '1.9.3'; },
6363
@{ModuleName = 'Az.Billing'; RequiredVersion = '1.0.3'; },
6464
@{ModuleName = 'Az.Cdn'; RequiredVersion = '1.4.3'; },
6565
@{ModuleName = 'Az.CognitiveServices'; RequiredVersion = '1.5.1'; },
66-
@{ModuleName = 'Az.Compute'; RequiredVersion = '4.3.0'; },
66+
@{ModuleName = 'Az.Compute'; RequiredVersion = '4.3.1'; },
6767
@{ModuleName = 'Az.ContainerInstance'; RequiredVersion = '1.0.3'; },
6868
@{ModuleName = 'Az.ContainerRegistry'; RequiredVersion = '1.1.1'; },
6969
@{ModuleName = 'Az.DataBoxEdge'; RequiredVersion = '1.1.0'; },

0 commit comments

Comments
 (0)