An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
This error is expected when using an Azure for Students subscription and it is not related to your template or deployment code.
The message InvalidTemplateDeployment with policy violation means that an Azure Policy applied to the student subscription is blocking the Azure OpenAI resource. Azure for Students subscriptions are heavily restricted and do not allow deployments to every region.
In Azure for Students, only a limited set of regions is allowed, and this list is different for each subscription. Even if a region supports Azure OpenAI in general, it may still be blocked for your student subscription. That is why trying common regions like East US or Sweden Central can still fail.
You can check which regions are allowed for your subscription directly in the Azure portal. Go to Azure Policy, then Assignments, and look for a policy called Allowed resource deployment regions. The regions listed there are the only ones where you can successfully create resources.
Once you find the allowed regions, try creating the Azure OpenAI resource again using one of those regions only. If Azure OpenAI is supported in any of the allowed regions, the deployment should work without errors.
There is no way to bypass or override this policy from inside an Azure for Students subscription. These policies are enforced at the subscription level and are intentional to control cost and usage. Azure OpenAI itself is not blocked by default, but it will only work if the region matches what the policy allows.
You can read more about Azure Policy behavior and policy based deployment restrictions here https://learn.microsoft.com/azure/governance/policy/overview
And general Azure OpenAI region availability here https://learn.microsoft.com/azure/ai-services/openai/concepts/models#model-availability
In short, this is a region restriction enforced by Azure Policy on student subscriptions. Check the allowed regions and deploy only in one of those.
I Hope this helps. Do let me know if you have any further queries.
Thankyou!