Recently I've started creating a new resource group but it seems to be stuck at provisioning server farm resource. Restarting deployment outputs the following error:
New-AzureResourceGroup: DeploymentActive: Unable to edit or replace deployment 'App': previous deployment from '8/26/2015 8:48:55 AM' is still active (expiration time is '9/2/2015 8:48:54 AM').
I have no time to wait for its expiration. Is there a way to cancel Azure ARM deployment?
Stop-AzureRmResourceGroupDeployment
should cancel the deployment and preserve the resourcegroup if you need to go that route.
You can use the Remove-AzureResourceGroup
cmdlet. It will start deleting the resources and cancel the deployment. However, the best way to avoid waiting for anything is to deploy with a different name, and let the delete run in the background.
Since Microsoft is retiring the AzureRm module, the new command looks like this:
Stop-AzDeployment
https://learn.microsoft.com/en-us/powershell/module/az.resources/stop-azdeployment?view=azps-9.1.0
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.