Skip to content

Instantly share code, notes, and snippets.

@davemkirk
Forked from bakins/coreos-image.sh
Created July 11, 2015 01:02
Show Gist options
  • Save davemkirk/96f0c9a3a3d37211d914 to your computer and use it in GitHub Desktop.
Save davemkirk/96f0c9a3a3d37211d914 to your computer and use it in GitHub Desktop.
function coreos-image {
REGION=$1
CHANNEL=${2:-stable}
EXPRESSION=`printf '.amis|map(select(.name == "%s"))[0]["hvm"]' "$REGION"`
curl --fail -s -L http://$CHANNEL.release.core-os.net/amd64-usr/current/coreos_production_ami_all.json | jq -r "$EXPRESSION"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment