Hi,
Thank you for posting in Microsoft Q&A forum.
The error indicates that there is a previous deployment that is still active and hasn't expired yet. You can't create a new deployment to replace or edit the active deployment until it has expired.
Per my experience, to resolve this issue, you need to wait until the active deployment expires or you can manually delete the active deployment from the command line using Azure CLI or PowerShell. You can try to use the Azure deployment group delete command in Azure CLI or the Remove-AzResourceGroupDeployment command in PowerShell to delete deployments from the history.
If you want to delete all deployments older than a certain number of days, you can use the --older-than parameter. For example, to delete all deployments older than five days, you can try the following command in Azure CLI:
az deployment group delete --resource-group <resource-group-name> --name <deployment-name> --older-than 5d
Refer to: az deployment group
And, for PowerShell, you can run the following command:
Remove-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -Name <deployment-name> -AgeFilterInDays 5
Thanks for your time. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.