Skip to content

Instantly share code, notes, and snippets.

@jbeda
Last active May 30, 2016 19:29
Show Gist options
  • Save jbeda/a59852baa2630ccc70a09b8cd4d74bb2 to your computer and use it in GitHub Desktop.
Save jbeda/a59852baa2630ccc70a09b8cd4d74bb2 to your computer and use it in GitHub Desktop.
Describe GCE instance from within instance
gcloud compute instances describe \
--zone $(/usr/share/google/get_metadata_value zone | cut -d / -f 4) \
$(/usr/share/google/get_metadata_value hostname | cut -d . -f 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment