DEV Community

Discussion on: GCP Cloud Functions with a Static IP

Collapse
 
nuc profile image
Georgios Giannoutsos Barkas

Thanks for the great guide.

Seems that the NAT creation requires a --router-region parameter now:

ERROR: (gcloud.compute.routers.nats.create) Underspecified resource [my-router]. Specify the [--router-region] flag.
Enter fullscreen mode Exit fullscreen mode

Then it works:

gcloud compute routers nats create my-cloud-nat-config \
    --router=my-router \
    --nat-external-ip-pool=functions-static-ip \
    --nat-all-subnet-ip-ranges \
    --enable-logging \
    --router-region=europe-west3
Enter fullscreen mode Exit fullscreen mode
Collapse
 
alvardev profile image
Alvaro David

Wow thanks for the update!
I didn't know about that flag, it even doesn't appear on the references lol xD
cloud.google.com/sdk/gcloud/refere...

I will check for that flag (this weekend I hope u.u)

Collapse
 
nuc profile image
Georgios Giannoutsos Barkas

Awesome, thanks!

By the way, I converted the commands to a terraform config, just in case anyone's interested.

Cheers :)