I have a PowerShell script that deploys an ARM template to Azure, but I have encountered an error that I can't quite seem to wrap my head around. When running in PowerShell, itself, I get the following error:
New-AzureRmResourceGroupDeployment : 7:46:01 AM - Error: Code=CannotUpdatePlan; Message=Resource plan can not be changed.
The error description doesn't seem all that complicated, but I'm not sure why this is the case in the first place. I don't have any locks on the Resource Group, resources, or subscription so it should theoretically be able to work properly, right?
Upon testing in VSTS, I got the error mentioned above along with the following error message preceding it:
Selected subscription is in 'Disabled' state.
I'm not sure if that has to do with the other, but I know the subscription is active as I can deploy resources to it, manually. Also, it clearly says "Active" when viewing the subscription from the portal.
According to your description, I suggest you could check as the following steps.
1.Ensure your subscription is enabled. For test, you could create a web app. If your subscription is really disabled, please refer to this link re-active your subscription.
2.You had better check your subscription connection. Please ensure subscription is right. When you verify connection, it should show Verified
.
Note: I use the agent Hosted VS2017
and use Azure PowerShell script to deploy template.