While creating Azure Container app with Networking options via Azure ARM automation script I am getting the below error:
Error Details:
{ "id": "/subscriptions/xxxx/resourceGroups/yyyy/providers/Microsoft.App/managedEnvironments/xxxxx",
"name": "testcontainerappsenv",
"type": "Microsoft.App/managedEnvironments",
"location": "westeurope",
"tags": {},
"systemData": {
"createdBy": "test@gmail.com",
"createdByType": "User",
"createdAt": "xxxx",
"lastModifiedBy": "test@gmail.com",
"lastModifiedByType": "User",
"lastModifiedAt": "xxxx"
},
"properties": {
"provisioningState": "Failed",
"vnetConfiguration": {
"internal": false, "infrastructureSubnetId": "/subscriptions/xxxx/resourceGroups/yyy/providers/Microsoft.Network/virtualNetworks/testvnt/subnets/aaaa",
"dockerBridgeCidr": "10.1.0.1/16",
"platformReservedCidr": "10.0.0.0/16",
"platformReservedDnsIP": "10.0.0.2"
},
"deploymentErrors": "**ErrorCode: ManagedEnvironmentResourceDisallowedByPolicy, Message: Fail to create managed environment because creation of required resources was disallowed by policy, refer to https://go.microsoft.com/fwlink/?linkid=2198255 for more detail.**",
"defaultDomain": "xxxxxx.westeurope.azurecontainerapps.io",
"appLogsConfiguration": {
"destination": "log-analytics",
"logAnalyticsConfiguration": {
"customerId": "xxxxxxxxxx"
}
}
}
}
Here goes the policy which is blocking us in this case: https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F783ea2a8-b8fd-46be-896a-9ae79643a0b1
Can anyone help us here by providing their guidance
After troubleshooting for few hours and going deep we found that the policy : https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F783ea2a8-b8fd-46be-896a-9ae79643a0b1 is not allowing us. In order to cross check we did a deployment without Networking and found it got created successfully.