This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from guardian/update-ami-20180122
Update ami 20180122
- Loading branch information
Showing
2 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/sh | ||
|
||
AMI_IMAGE_NAME="ubuntu/images/hvm-ssd/ubuntu-wily-15.10-amd64-server-20160217.1" | ||
AMI_IMAGE_NAME="ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20180122" | ||
|
||
# http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region | ||
|
||
for region in us-east-1 us-west-2 us-west-1 eu-west-1 eu-central-1 ap-southeast-1 ap-northeast-1 ap-southeast-2 ap-northeast-2 sa-east-1 | ||
for region in us-east-1 us-west-2 us-west-1 eu-west-1 eu-west-2 eu-central-1 ap-southeast-1 ap-northeast-1 ap-southeast-2 ap-northeast-2 sa-east-1 | ||
do | ||
printf "\"$region\" : {" | ||
aws ec2 describe-images --filters Name=name,Values=$AMI_IMAGE_NAME --region $region | grep "ImageId" | sed s/,// | tr -d '\n' | ||
printf "},\n" | ||
printf " $region:\n" | ||
IMAGE_ID=`aws ec2 describe-images --filters Name=name,Values=$AMI_IMAGE_NAME --region $region | jq .Images[].ImageId` | ||
printf " ImageId: ${IMAGE_ID//\"}\n" | ||
done |