Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Global Forwarding: Invalid value for field resource.IPAddress

Tags:

I am trying to implement https support for my GCP VM. For the purpose, I created all the load balancing components i.e. instance group, health check, backend service, url map & target proxy. All were created without error. However now when I am creating a global forwarding rule for the final step, I am getting the following error:

ERROR: (gcloud.compute.forwarding-rules.create) Could not fetch resource: - Invalid value for field 'resource.IPAddress': '35.xxx.xxx.xxx'. Invalid IP address specified.

I am using the following command:

gcloud compute forwarding-rules create fa-global-fwding-rule-1 --target-https-proxy=fa-https-proxy-1 --ports=443  --global --address=35.xxx.xxx.xxx

(IP add digits masked with xxx)

What am I missing?

I already have a working VM instance through http where I had promoted its ephemeral address to a static address (above is the same address 35.xxx.xxx.xxx)

Also once I implement https support, I want the http connect to continue working as well so that my existing apis are not disturbed until I move them to https

Any advice/help?

like image 837
dgarg Avatar asked Aug 30 '18 08:08

dgarg


People also ask

Which types of external IP addresses are supported by forwarding rule in Google Compute Engine?

Forwarding rules for target pool-based network load balancer support only IPv4 addresses. For regional external IPv4 addresses, the Network Load Balancing supports both Standard Tier and Premium Tier. Regional external IPv6 addresses are only available in the Premium Tier.


1 Answers

GCPs Load Balancer does not check to see if the static IP you picked was regional or global. If you accidentally reserved a "regional" IP instead of a "global" IP, it throws that silly error:

Invalid value for field 'resource.IPAddress': '35.xxx.xxx.xxx'. Invalid IP address specified.

like image 157
bestbear Avatar answered Nov 09 '22 20:11

bestbear