Last active
August 29, 2015 14:19
-
-
Save bakins/eb9893bdda9dd138d7bb to your computer and use it in GitHub Desktop.
Get CoreOS AMI for an AWS region
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cores-image { | |
REGION=$1 | |
CHANNEL=${2:-alpha} | |
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