In Terraform after adding the following NSG Rule, I still get an error message below, What could be the issue?
resource "azurerm_network_security_rule" "someresource_nsg_rule_inbound" {
name ="Management_Endpoint_for_Azure_Portal_and_Powershell"
priority = 110
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "3443"
source_address_prefix = "ApiManagement"
destination_address_prefix = "VirtualNetwork"
resource_group_name = azurerm_resource_group.someresource_rg.name
network_security_group_name = azurerm_network_security_group.someresource_nsg.name
}
------
│ Error: retrieving Policy for Service (Subscription: "xxxxxxxxxx"
│ Resource Group Name: "SomeResource-Dev"
│ Service Name: "someResource-dev-apim"): unexpected status 422 (422 Unprocessable
Entity) with error: ManagementApiRequestFailed: Failed to connect to management
endpoint someResource-dev-apim.management.azure-api.net:3443 for a service
deployed in a Virtual Network. Make sure to follow guidance at
https://aka.ms/apim-vnet-common-issues for Inbound connectivity to Management
endpoint. Check 'ApiManagement
Control Plane - inbound' connectivity at https://aka.ms/apimnetworkstatus.