Skip to content

Commit 4953fe7

Browse files
authored
May breaking change warnings for New-AzVM, New-AzVmss, New-AzGalleryImage (#24437)
* breaking change warnings * getazvmss brk msg * Update ChangeLog.md
1 parent 1e239c8 commit 4953fe7

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
* Renamed parameter `-AutoOSUpgrade` to `-EnableAutomaticOSUpgrade` in `New-AzVmssConfig` cmdlet for consistency. Using `-AutoOSUpgrade` as parameter name will continue to work as it is added as an alias.
2525
* Upgraded Azure.Core to 1.37.0.
2626
* Az.Compute is updated to use the 2023-07-03 GalleryRP REST API calls.
27+
* Added breaking change warnings for the May 2024 release. The warnings are for:
28+
`New-AzGalleryImageVersion` defaulting to turn on TrustedLaunchSupported and HyperVGeneration to V2.
29+
`New-AzVM` and `New-AzVmss` will default to the image `Windows Server 2022 Azure Edition` instead of `Windows 2016 Datacenter` by default.
30+
`Get-AzVmss` will no longer allow empty values to `ResourceGroupName` and `VMScaleSetName` to avoid a bug where it will just return nothing.
2731

2832
## Version 7.1.2
2933
* Fixed `New-AzVM` when a source image is specified to avoid an error on the `Version` value.

src/Compute/Compute/Generated/GalleryImage/GalleryImageCreateOrUpdateMethod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2929
using Microsoft.Azure.Management.Compute;
3030
using Microsoft.Azure.Management.Compute.Models;
31+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
3132
using Microsoft.WindowsAzure.Commands.Utilities.Common;
3233

3334
namespace Microsoft.Azure.Commands.Compute.Automation
3435
{
36+
[GenericBreakingChangeWithVersionAttribute("Starting in May 2024 the \"New-AzGalleryImage\" cmdlet will deploy with the Trusted Launch configuration by default. To know more about Trusted Launch, please visit https://docs.microsoft.com/en-us/azure/virtual-machines/trusted-launch", "12.0.0", "8.0.0")]
3537
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "GalleryImageDefinition", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
3638
[OutputType(typeof(PSGalleryImage))]
3739
public partial class NewAzureRmGalleryImage : ComputeAutomationBaseCmdlet

src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929
using Microsoft.Azure.Management.Compute;
3030
using Microsoft.Azure.Management.Compute.Models;
3131
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
32+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
3233
using Microsoft.WindowsAzure.Commands.Utilities.Common;
3334

3435
namespace Microsoft.Azure.Commands.Compute.Automation
3536
{
37+
[GenericBreakingChangeWithVersionAttribute("Starting in May 2024 the \"Get-AzVmss\" cmdlet will no longer allow an empty value for resource group name and virtual machine scale set name.", "12.0.0", "8.0.0")]
3638
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Vmss", DefaultParameterSetName = "DefaultParameter")]
3739
[OutputType(typeof(PSVirtualMachineScaleSet))]
3840
public partial class GetAzureRmVmss : ComputeAutomationBaseCmdlet

src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
namespace Microsoft.Azure.Commands.Compute.Automation
3636
{
37+
[GenericBreakingChangeWithVersionAttribute("Starting in May 2024 the \"New-AzVmss\" cmdlet will deploy with the image 'Windows Server 2022 Azure Edition' by default. This will make migrating to Trusted Launch easier in the future. To know more about Trusted Launch, please visit https://docs.microsoft.com/en-us/azure/virtual-machines/trusted-launch", "12.0.0", "8.0.0")]
3738
public partial class NewAzureRmVmss : ComputeAutomationBaseCmdlet
3839
{
3940
private const string flexibleOrchestrationMode = "Flexible", uniformOrchestrationMode = "Uniform";
@@ -51,7 +52,8 @@ public partial class NewAzureRmVmss : ComputeAutomationBaseCmdlet
5152
"Ubuntu2204",
5253
"FlatcarLinuxFreeGen2",
5354
"Win2022Datacenter",
54-
"Win2022AzureEditionCore",
55+
"Win2022AzureEditionCore",
56+
"Win2022AzureEdition",
5557
"Win2019Datacenter",
5658
"Win2016Datacenter",
5759
"Win2012R2Datacenter",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
namespace Microsoft.Azure.Commands.Compute
6161
{
62+
[GenericBreakingChangeWithVersionAttribute("Starting in May 2024 the \"New-AzVM\" cmdlet will deploy with the image 'Windows Server 2022 Azure Edition' by default. This will make migrating to Trusted Launch easier in the future. To know more about Trusted Launch, please visit https://docs.microsoft.com/en-us/azure/virtual-machines/trusted-launch", "12.0.0", "8.0.0")]
6263
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VM", SupportsShouldProcess = true, DefaultParameterSetName = "SimpleParameterSet")]
6364
[OutputType(typeof(PSAzureOperationResponse), typeof(PSVirtualMachine))]
6465
public class NewAzureVMCommand : VirtualMachineBaseCmdlet
@@ -221,6 +222,7 @@ public class NewAzureVMCommand : VirtualMachineBaseCmdlet
221222
"FlatcarLinuxFreeGen2",
222223
"Win2022Datacenter",
223224
"Win2022AzureEditionCore",
225+
"Win2022AzureEdition",
224226
"Win2019Datacenter",
225227
"Win2016Datacenter",
226228
"Win2012R2Datacenter",

0 commit comments

Comments
 (0)