Skip to content

Instantly share code, notes, and snippets.

@mtnygard
Last active July 18, 2020 15:08
Show Gist options
  • Save mtnygard/0e1630300633aa5ea50da21fa33e0ecf to your computer and use it in GitHub Desktop.
Save mtnygard/0e1630300633aa5ea50da21fa33e0ecf to your computer and use it in GitHub Desktop.
Get gcloud instances in default project as /etc/hosts format
gcloud compute instances list --format "table[no-heading](networkInterfaces[0].accessConfigs[0].natIP, name)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment