Hi I'am having issues with deploying the app service through azure portal and terraform.
When I try to deploy the service I get this error The subscription 'xxxx-xxxx-xxxx' is not allowed to create or update the serverfarm. But 2 days ago I was able to deploy without any issues.
I checked on github and azure learn but had no luck, does anyone have any idea why it's not working?
[fixed]
Hey everyone, Just wanted to give you a quick update – the issue seems to have resolved itself. I reached out to the Azure support team and had a couple of conversations with them over the last three days. We went through the classic troubleshooting steps like changing the plan, resource group, and location, but unfortunately, nothing seemed to help. Interestingly, I decided to try deploying again through the Azure portal every morning to see if there were any changes. Yesterday, to my surprise, the deployment went through successfully. Sometimes, things just work out on their own! Thanks for your support and suggestions.
Need to check below:
Make sure that you are attempting to create or update both the service plan and app service in the same region to prevent conflicts.
Verify the existence of any Azure Policies created by other users that might impact or restrict the creation or modification of the server farm or related resources.
Check the providers list and register
Microsoft.Web
provider if is not existed with the help of below CLI commands.az provider register --namespace Microsoft.Web
Clear all the logged in subscriptions cache using
az account clear
command and set the required subscription freshly usingaz account set --name
command. Now if required login into Az account withaz login
command.Verify the Terraform code configuration and ensure that the
app_service_plan_id
is accurately defined and associated with the identical resource group as theApp Service
.After checking all the above, I tried deploying an app service in a dedicated app service plan and the deployment was successful as shown below.
Template taken from
azurerm_app_service
terraform registry.Deployment succeeded:
Reference discussion for the relevant issue.