Unable to create subnets in Vnet using terraform

Chaitanya kumar 1 Reputation point
2021-02-11T13:05:47.427+00:00

When I try to create Vnet, Subnets, NAT Gateway, Route tables from terraform script I'm getting following error.
Error: Error Creating/Updating Subnet "private-1" (Virtual Network "myvpc" / Resource Group "acceptanceTestResourceGroup2"): network.SubnetsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="SubscriptionNotRegisteredForFeature" Message="Subscription 60471ca2-f532-4ac9-8736-d89df5c2b54d is not registered for feature Microsoft.Network/AllowMultipleAddressPrefixesOnSubnet required to carry out the requested operation." Details=[]
Kindly check this error and reply back ASAP.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,201 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Andriy Bilous 11,011 Reputation points MVP
    2021-02-11T15:01:55.333+00:00

    What is the value for variable var.public_cidr?
    May you please share also your variables.tf file?

    3 people found this answer helpful.

  2. George Gildenhuys 1 Reputation point
    2021-03-31T10:09:44.943+00:00

    How did you fix this?

    I am getting feature Microsoft.Network/AllowMultipleAddressPrefixesOnSubnet when using either terraform or azcli:

    az network vnet subnet create --address-prefixes 10.120.1.0/24 10.120.2.0/24 --name dynamicsubnet --resource-group Networking --vnet-name sandboxukso-private

    0 comments No comments

  3. NarenderSingh 61 Reputation points
    2021-05-19T04:57:08.627+00:00

    Hi,

    What was the solution of it? I am also getting the same error where I have 4 subnets in the variable list in my variable.tf?

    0 comments No comments

  4. Hagen Rahn 1 Reputation point
    2022-06-01T09:18:51.88+00:00

    Currently the required resource provider is not available for public access, GA or pre. so using this feature is not possible, if you are not working as MS developer.
    I have created a bug report to update terraform docu: https://github.com/hashicorp/terraform-provider-azurerm/issues/17052

    0 comments No comments