Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
terraform jq example
cat terraform.tfstate | jq -r '.modules[0].resources | map(select(.type == "google_compute_instance")) | map([, " ansible_ssh_host=", .primary.attributes["network_interface.0.access_config.0.nat_ip"]] | join("")) | sort | .[]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.