I have try to create or attach the forwarding rules to targetProxies for my internal load balancer but unfortunately, I am not able to do so as it trying to look in "global" instead of the region. All the resources have been created regionally as I am using regional internal LB. How could we solve this problem?
ERROR:
10:29:21 module.gce-ilb-https.google_compute_forwarding_rule.default: Creating...
10:29:22
10:29:22 Error: Error creating ForwardingRule: googleapi: Error 404: The resource 'projects//global/networks/' was not found, notFound
10:29:22
10:29:22 with module.gce-ilb-https.google_compute_forwarding_rule.default,
name = "${var.env}-${var.region}-ilb-target-proxy"
region = "${var.region}"
project = "${var.project_id}"
url_map = local.url_map
}`
NOTE: all other resources have been able to create regional I can create when I manually update LB which created a region target proxy but I try to use the same instead of looking in the region it looks in global.
Expected behavior
No response
Observed behavior
Should pick or create forwarding rules target proxy from the region instead of global when given a region option
TL;DR
I have try to create or attach the forwarding rules to targetProxies for my internal load balancer but unfortunately, I am not able to do so as it trying to look in "global" instead of the region. All the resources have been created regionally as I am using regional internal LB. How could we solve this problem?
ERROR: 10:29:21 module.gce-ilb-https.google_compute_forwarding_rule.default: Creating... 10:29:22/global/networks/' was not found, notFound
10:29:22
10:29:22 Error: Error creating ForwardingRule: googleapi: Error 404: The resource 'projects/
10:29:22 with module.gce-ilb-https.google_compute_forwarding_rule.default,
I use the following resource in the code
`
Regional forwarding rule
resource "google_compute_forwarding_rule" "default" { name = "${var.env}-${var.region}-ilb-forwarding-rule" region = "${var.region}" depends_on = [local.proxy_subnet] ip_protocol = "TCP" ip_address = local.address load_balancing_scheme = "INTERNAL_MANAGED" port_range = "80" target = google_compute_region_target_http_proxy.default.self_link network = local.network subnetwork = local.subnetwork network_tier = "PREMIUM" }
Regional HTTP proxy
resource "google_compute_region_target_http_proxy" "default" {
count = local.create_http_forward ? 1 : 0
name = "${var.env}-${var.region}-ilb-target-proxy" region = "${var.region}" project = "${var.project_id}" url_map = local.url_map }`
NOTE: all other resources have been able to create regional I can create when I manually update LB which created a region target proxy but I try to use the same instead of looking in the region it looks in global.
Expected behavior
No response
Observed behavior
Should pick or create forwarding rules target proxy from the region instead of global when given a region option
Terraform Configuration
Terraform Version
Additional information
No response