Problem
You are trying to create an Internal HTTP Load Balancer (ILB) but you get the following error message:
Invalid value for field 'resource.target': 'projects/<project_name>/regions/asia-southeast2/targetHttpsProxies/<ilb_proxy_name>'. A reserved and active subnetwork is required in the same region and VPC as the forwarding rule.
A reserved and active subnetwork is required in the same region and a VPC as the forwarding rule.
Environment
- Cloud Console
- Network Services
- Load Balancing
Solution
- Create a separate proxy-only subnet in the same region where you want to create the ILB.
- Make sure that the Proxy-only subnet should be present before you proceed for creating the ILB.
Cause
You should not reuse an existing subnet as the proxy-only subnet; you must create a new subnet in each region that has an internal HTTP(S) load balancer. This is in part because the subnets update command doesn't allow modifying a subnet's --purpose field. For the proxy-only subnet, the --purpose must be set to INTERNAL_HTTPS_LOAD_BALANCER.
Each proxy listens on the IP address and port specified by the corresponding load balancer's forwarding rule. Each packet sent from a proxy to a backend VM or endpoint has a source IP address from the proxy-only subnet.