Skip to content

Instantly share code, notes, and snippets.

@JacobJohansen
Created March 7, 2019 15:16
Show Gist options
  • Save JacobJohansen/e9b0f12b465263dc58f8ce172536191f to your computer and use it in GitHub Desktop.
Save JacobJohansen/e9b0f12b465263dc58f8ce172536191f to your computer and use it in GitHub Desktop.
terraform http provider to pull cloudflares ips and map them into an array
data "http" "cloudflare_ipv4" {
url = "https://www.cloudflare.com/ips-v4"
}
output "cloudflare_ip" {
value = "${split("\n",chomp(data.http.cloudflare_ipv4.body))}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment