I'm using Cloud Shell within Google Cloud Console to connect to my Google Cloud Datalab GCE VM using these instructions. I have a firewall on my Google Cloud Datalab GCE VM that restricts SSH access to certain IP addresses only. The problem I have is that the cloud shell IP address changes frequently. Is it possible to set a static external IP address for Cloud Shell, or is there a list of IP ranges that will be used for cloud shell machines? I'm open to other suggestions about how to connect via ssh to a GCE VM with restricted firewall within cloud shell as well.
Yes you can set static external IP of your VM. Please follow following link of google documentation for same.
https://cloud.google.com/compute/docs/configure-ip-addresses
Go to Section "Reserving a new static external IP address".
I have tried it previously an 6 months back it works smoothly.
But in your no. 2 won't be valid as your firewall would block it anyways.