Is there any workaround to do Storage failover using CICD pipeline? Below links talk about installing preview version. I tried to put 1.1.1-preview in preferred version on Azure powershell task but doesn't work
Solution:
I added all powershell commands on this link and it worked through CICD https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?tabs=azure-powershell
I tried to put 1.1.1-preview in preferred version on Azure powershell task but doesn't work
The 1.1.1-preview is one version of Az.Storage
module, instead of version of Azure Powershell
.
So if you set 1.1.1-preview
as Preferred Azure PowerShell Version
, the Azure Powershell task can't recognize this version and the error will be thrown:
[error]The Azure PowerShell version '1.1.1.preview' specified is not in the correct format.
So I suggest using Azure CLI task (Inline Script mode) with content below:
az storage account show \ --name accountName \ --expand geoReplicationStats
az storage account failover \ --name accountName
You can refer to related document here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.