Skip to content

Instantly share code, notes, and snippets.

@tdewin
Created April 18, 2024 08:20
Show Gist options
  • Save tdewin/50cff467d090e75017c8db7350f67969 to your computer and use it in GitHub Desktop.
Save tdewin/50cff467d090e75017c8db7350f67969 to your computer and use it in GitHub Desktop.
myaddr-google-dig.tf
# you can use external.myaddr.result.myip
data "external" "myaddr" {
program = ["bash", "-c", "echo \"{\\\"myip\\\": $(dig -4 TXT o-o.myaddr.l.google.com @ns1.google.com +short) }\""]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment