Skip to content

Instantly share code, notes, and snippets.

@ryane
Last active November 7, 2019 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryane/846751313c072622b13a to your computer and use it in GitHub Desktop.
Save ryane/846751313c072622b13a to your computer and use it in GitHub Desktop.
Waits for AWS instances launched from Terraform to become healthy
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