Posted on 26-Mar-2022
If you need to get the current ip of the machine that runs the terraform script, use the following declarations:
data "http" "myip" { url = "http://ipv4.icanhazip.com" } output "myip" { value = "${chomp(data.http.myip.body)}/32" }