Skip to content

Instantly share code, notes, and snippets.

@mika
Created April 26, 2022 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mika/b23651665125ef1650bf720fa0e4f273 to your computer and use it in GitHub Desktop.
Save mika/b23651665125ef1650bf720fa0e4f273 to your computer and use it in GitHub Desktop.
Detect Azure environments
wget --timeout=3 --wait=3 --tries=1 -O /dev/null --quiet --no-proxy --header="Metadata:true" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
echo $?
curl -s -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01"
echo $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment