From 8b6e37ce0bd28a7917a2251c8a4349b39c1d777c Mon Sep 17 00:00:00 2001 From: Yifan Zhang Date: Tue, 17 Jan 2023 11:21:17 +0800 Subject: [PATCH 1/4] Add warning for AllowBlobPublicAccess default behavior change --- .../StorageAccount/NewAzureStorageAccount.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs index 55466dacc078..e95afed17fc4 100644 --- a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs +++ b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs @@ -22,9 +22,12 @@ using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using System; using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.Azure.Commands.Management.Storage { + [GenericBreakingChange("Default behavior of AllowBlobPublicAccess will be changed", OldWay = "AllowBlobPublicAccess is set to True by defult.", + NewWay = "AllowBlobPublicAccess is set to False by default")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccount", DefaultParameterSetName = AzureActiveDirectoryDomainServicesForFileParameterSet), OutputType(typeof(PSStorageAccount))] public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet { From 2a4d0a3edf622b176a1cb61febac076a6cf3e80a Mon Sep 17 00:00:00 2001 From: Yifan Zhang Date: Tue, 17 Jan 2023 15:00:18 +0800 Subject: [PATCH 2/4] add changelog --- src/Storage/Storage.Management/ChangeLog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index 6e371b46f654..5b3c632e5fe3 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,7 +18,8 @@ - Additional information about change #1 --> ## Upcoming Release - +* Add a warning message for the upcoming breaking change when creating a Storage account + - `New-AzStorageAccount` ## Version 5.3.0 * Return ListBlobProperties in blob list result - `Get-AzStorageBlob` From 8dc4b93f3c7c9a8edb6916f62060528378ba388f Mon Sep 17 00:00:00 2001 From: Yifan Zhang Date: Tue, 17 Jan 2023 15:59:57 +0800 Subject: [PATCH 3/4] update message --- src/Storage/Storage.Management/ChangeLog.md | 3 ++- .../StorageAccount/NewAzureStorageAccount.cs | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index 5b3c632e5fe3..03300e719e5e 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,8 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release -* Add a warning message for the upcoming breaking change when creating a Storage account +* Add a warning message for the upcoming breaking change when creating a Storage account - `New-AzStorageAccount` + ## Version 5.3.0 * Return ListBlobProperties in blob list result - `Get-AzStorageBlob` diff --git a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs index e95afed17fc4..d181900f1dec 100644 --- a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs +++ b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs @@ -26,8 +26,11 @@ namespace Microsoft.Azure.Commands.Management.Storage { - [GenericBreakingChange("Default behavior of AllowBlobPublicAccess will be changed", OldWay = "AllowBlobPublicAccess is set to True by defult.", - NewWay = "AllowBlobPublicAccess is set to False by default")] + [GenericBreakingChange("Default behavior of AllowBlobPublicAccess will be changed in a future release. The default value of the property will be " + + "changed from True to False. With AllowBlobPublicAccess set to False for the Storage account, a container's public access level cannot be set. " + + "If you attempt to set the public access level, it will error out indicating that the container's public access level cannot be set.", + OldWay = "AllowBlobPublicAccess is set to True by defult.", + NewWay = "AllowBlobPublicAccess is set to False by default.")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccount", DefaultParameterSetName = AzureActiveDirectoryDomainServicesForFileParameterSet), OutputType(typeof(PSStorageAccount))] public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet { From fab634ac6e4ef89cc3c74d9857467334323facf0 Mon Sep 17 00:00:00 2001 From: Yifan Zhang Date: Tue, 17 Jan 2023 16:49:50 +0800 Subject: [PATCH 4/4] Update warning message --- .../StorageAccount/NewAzureStorageAccount.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs index d181900f1dec..8a8df5e85454 100644 --- a/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs +++ b/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs @@ -26,9 +26,8 @@ namespace Microsoft.Azure.Commands.Management.Storage { - [GenericBreakingChange("Default behavior of AllowBlobPublicAccess will be changed in a future release. The default value of the property will be " + - "changed from True to False. With AllowBlobPublicAccess set to False for the Storage account, a container's public access level cannot be set. " + - "If you attempt to set the public access level, it will error out indicating that the container's public access level cannot be set.", + [GenericBreakingChange("Default value of AllowBlobPublicAccess will be changed from True to False in a future release. " + + "When AllowBlobPublicAccess is False on a storage account, it is not permitted to configure container ACLs to allow anonymous access to blobs within the storage account.", OldWay = "AllowBlobPublicAccess is set to True by defult.", NewWay = "AllowBlobPublicAccess is set to False by default.")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "StorageAccount", DefaultParameterSetName = AzureActiveDirectoryDomainServicesForFileParameterSet), OutputType(typeof(PSStorageAccount))]