I don't understand why I'm getting this error?
Error: Error Creating/Updating Application Gateway "apgw-ngd-mig-01" (Resource Group "rg-ngd-mig-inf-01"): network.ApplicationGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidResourceReference" Message="Resource /subscriptions/5397f7a7-fbed-4dd5-bf06-151e8ca58ba7/resourceGroups/rg-ngd-mig-inf-01/providers/Microsoft.Network/applicationGateways/apgw-ngd-mig-01/urlPathMaps/value referenced by resource /subscriptions/5397f7a7-fbed-4dd5-bf06-151e8ca58ba7/resourceGroups/rg-ngd-mig-inf-01/providers/Microsoft.Network/applicationGateways/apgw-ngd-mig-01/requestRoutingRules/default-Rule was not found. Please make sure that the referenced resource
exists, and that both resources are in the same region." Details=[]
on appgw\main.tf line 1, in resource "azurerm_application_gateway" "apgw":
1: resource "azurerm_application_gateway" "apgw" {
Any suggestions?
The error message indicated that Resource
urlPathMaps/value
referenced by resourcerequestRoutingRules/default-Rule
was not found. You could check if you have referenced correcturl_path_map_name
in the block ofrequest_routing_rule
.Here is the related terraform code for your reference