I have couple of instances on GCE that I don\'t really need static addresses for, but I still need to make them accessible via dns name. Since ephemeral external ip addresse
It's been a while since you've posted this question, but i'll post my answer here for future reference.
I've had a similar need and I didn't want to use gcloud CLI.
I've created a simple python script that does pretty much the same as the bash script above does, but uses Apache Libcloud and Google Cloud API credentials (service account and key).
You can find the code in GitHub.