Amateur_Kim
Amateur_Kim

Reputation: 111

I get a deployment Error when trying to publish a solution to Azure

Template deployment failed. Deployment operation statuses: Failed: /subscriptions/7696ec04-ba92-4f74-99ad-27808b065cfe/resourceGroups/BookService20211123165113ResourceGroup/deployments/website_deployment_20211124144346 (exception) error (SubscriptionIsOverQuotaForSku): This region has quota of 0 instances for your subscription. Try selecting different region or SKU.

Upvotes: 11

Views: 15423

Answers (5)

Harendra Singh
Harendra Singh

Reputation: 323

This method worked for me. As I'm from India, I tested it with these regions: West India, Central India, and South India. Please try using these regions.

Upvotes: 0

Akshay Bagi
Akshay Bagi

Reputation: 199

I was also facing same issue when I was creating the function through Azure Portal (Trail Version). When I tried same with help of Azure power shell it worked.

Below is the link for creating Functions through powershell commands.

https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-powershell?tabs=windows%2Cazure-powershell%2Cbrowser

Upvotes: 0

Tu Lan
Tu Lan

Reputation: 1

If you followed the MS learning pathway program for bicep, keep that in mind 'location' property does matter, if you are assigning its value by resourceGroup().location, there's a potential risk that you will get the above errors. As a learner I am still not 100% sure about the reason, even my sandbox resource Group was created in 'West-us', but its 'Storage Account' for cloud shell was created based on my geographical location, in my case is 'southeast asia'. There are some vague concepts behind the scene for stopping you from directly using the original value(location) of 'resourceGroup'.

Upvotes: 0

Thiddious
Thiddious

Reputation: 81

There is currently (as of the time of this writing) an issue with creating a new Azure App Service directly from the 'Publish...' feature in Visual Studio for 'Free' Azure accounts. I do not believe Mohammad's answer is the best route since you are definitely allowed to use App Services under the 'Free' subscription in Azure and you should not have to upgrade your subscription to 'Pay as you go'.

To resolve this and avoid upgrading your subscription:

  • Open Azure portal online
  • Search for 'App Service'
  • Pick 'Create app service'
  • Pick your Subscription and Resource Group
  • Give it a Name
  • Fill in your appropriate parameters, such as: Code, .NET 6, Windows, EAST US, etc.
  • Pick your Windows Plan
  • Your 'Sku' should still say 'Free F1'
  • Zone redundancy will probably be greyed out
  • Press 'Review + create'
  • Press 'Create'
  • Wait for the deployment to finish and make sure you can see it in App Services.
  • Go back to Visual Studio and pick 'Select Existing' instead of 'Create New'
  • Open the folder structure all the way and pick the item your created (It will probably be right above 'Deployment Slots', but if nothing shows up, then the only solution I have for you is to upgrade to Visual Studio 2022 or open it in another version of Visual Studio and select 'Publish' again. That worked for me.)
  • Press OK

The exact steps may vary as Microsoft changes things, but the concept is that currently for Free accounts you have to to create the App Service in the Azure Portal first, instead of creating it through 'Publish' in Visual Studio.

Upvotes: 8

Mohammad Atiour Islam
Mohammad Atiour Islam

Reputation: 5708

I was using a trial subscription. I upgrade my subscription pay as you go (Basic). Now it works for me.

Upvotes: 3

Related Questions