with @description('The Azure region into which the resources should be deployed.') param location string = 'westus3' template doesnt work

Aliaksei Ulitsin 0 Reputation points
2024-04-24T11:01:09.5233333+00:00

deployment fails with exception:

New-AzResourceGroupDeployment: 12:54:37 PM - Error: Code=InvalidTemplateDeployment; Message=The template deployment '298d0999-ee86-4355-80cc-f5c5234683e8' is not valid according to the validation procedure. The tracking id is '6479f98e-c5e0-460b-b058-0c49493fb40b'. See inner errors for details. New-AzResourceGroupDeployment: 12:54:37 PM - Error: Code=ValidationForResourceFailed; Message=Validation failed for a resource. Check 'Error.Details[0]' for more information. New-AzResourceGroupDeployment: 12:54:37 PM - Error: Code=SubscriptionIsOverQuotaForSku; Message=This region has quota of 0 instances for your subscription. Try selecting different region or SKU. New-AzResourceGroupDeployment: The deployment validation failed

when location set to:

@description('The Azure region into which the resources should be deployed.') param location string = 'westus3'

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
946 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 11,385 Reputation points MVP
    2024-04-24T11:03:33.5733333+00:00

    You need to choose a different Azure region. To check the quotas, follow https://learn.microsoft.com/en-us/azure/quotas/view-quotas


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. pnaroju 1,250 Reputation points Microsoft Vendor
    2024-04-24T15:21:07.3166667+00:00

    Hi Aliaksei Ulitsin,

    Upon reviewing the provided query, it has come to our attention that the deployment of the Bicep template file to Azure via Azure PowerShell command encounters failures.

    As advised by Marcin Policht, it is imperative to select a different Azure region due to existing quota limitations across Azure regions.

    In response, we have adjusted the location to eastus within the Bicep template file and conducted a successful deployment to Azure using the Azure PowerShell command "New-AzResourceGroupDeployment," encountering no exceptions.

    Furthermore, as outlined in the documentation tip, it is advisable to create resources in Azure regions that differ from the resource group's location when working with the Microsoft Learn sandbox.

    tip Please find attached below screenshots illustrating the successful deployment of the template file to Azure, wherein the resource group location of the Learn sandbox (West US) differs from the resources location (eastus), for your reference.

    image (3)

    newimage33

    We kindly request that you modify the location to eastus or any other region distinct from the resource group location within the Bicep template file and proceed with the deployment.

    If you find the provided information helpful, kindly acknowledge by clicking the "Upvote" and "Accept Answer" options on the post.

    Should you encounter further difficulties, please do not hesitate to attach screenshots of the errors encountered. We are glad to assist to you.

    (NOTE: Please conceal all your privacy details before posting)

    Thank you.

    0 comments No comments