Hi Thunguti Naveen Kumar •,
Welcome to Microsoft Q&A forum.
As I understand, you are getting error while creating Azure SQL Database as "resource was disallowed by policy"
The error occurred when an administrator attempted to create a network interface with a public IP address. A policy assignment enables enforcement of a built-in policy definition that prevents public IPs on network interfaces.
You can use the name of a policy assignment or policy definition to get more details about a policy that caused the error. The example commands use placeholders for input. For example, replace <policy definition name>
including the angle brackets, with the definition name from your error message.
To get more information about a policy definition, use az policy definition show.
In Azure CLI, type:
defname=<policy definition name>
az policy definition show --name $defname
To get more information about a policy assignment, use az policy assignment show.
rg=<resource group name>
assignmentname=<policy assignment name>
az policy assignment show --name $assignmentname --resource-group $rg
For security or compliance, your subscription administrators might assign policies that limit how resources are deployed. For example, policies that prevent creating public IP addresses, network security groups, user-defined routes, or route tables.
To resolve RequestDisallowedByPolicy
errors, review the resource policies and determine how to deploy resources that comply with those policies. The error message displays the names of the policy definition and policy assignment.
Your Subscription Administrator has set a policy that disallows the creation of such resources.
You will need to contact your Subscription Administrator so that they can change the policy to allow creation of SQL DB resources.
You can read more about Azure Policy here: https://learn.microsoft.com/en-us/azure/governance/policy/overview.
Hope this helps. If this answers your query, do click Accept Answer
and Mark Helpful
for the same. And, if you have any further query do let us know.
Thank you.