Created
December 19, 2022 20:45
-
-
Save chrismarget/768be3c2a7aa3c55566890279c7ba5f7 to your computer and use it in GitHub Desktop.
terraform technique to get own external IP address -- useful for writing debug-friendly security group rules
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
data "external" "operator_ip" { | |
program = ["bash", "-c", "jq -n --arg ip $(curl -s https://checkip.amazonaws.com) '{\"ip\":$ip}'"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment