Created
May 22, 2018 10:09
-
-
Save udkyo/a5da4ca6496efc3e238d36fd813bc305 to your computer and use it in GitHub Desktop.
Terraform - get local external IP
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" "public_ip" { | |
program = [ "sh", "-c", "echo {\\\"ip\\\": \\\"$(curl ifconfig.io)\\\"}" ] | |
//populates ${data.external.public_ip.result.ip} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment