Last active
November 7, 2019 03:12
-
-
Save ryane/846751313c072622b13a to your computer and use it in GitHub Desktop.
Waits for AWS instances launched from Terraform to become healthy
This file contains hidden or 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
aws ec2 wait instance-status-ok --instance-ids $(cat terraform.tfstate | jq '.modules[].resources[] | select(.type == "aws_instance") | .primary.attributes.id' | sed 's/\"//g' | tr '\n', ' '; echo '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment