Skip to content

Instantly share code, notes, and snippets.

@rsponholtz
Created November 4, 2018 20:35
Show Gist options
  • Save rsponholtz/9e8a276ca6e2662b4ccaebe81d016082 to your computer and use it in GitHub Desktop.
Save rsponholtz/9e8a276ca6e2662b4ccaebe81d016082 to your computer and use it in GitHub Desktop.
get private ip address from azure metadata service
ipaddr=`curl -H Metadata:true "http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress/0/privateIpAddress?api-version=2017-04-02&format=text"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment