-
-
Save epcim/2d0d61442a745e9cd5afb85ef8e45aa8 to your computer and use it in GitHub Desktop.
terraform jq example
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
cat terraform.tfstate | jq -r '.modules[0].resources | map(select(.type == "google_compute_instance")) | map([.primary.id, " 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