» cloudflare_ip_ranges
Use this data source to get the IP ranges of Cloudflare edge nodes.
» Example Usage
data "cloudflare_ip_ranges" "cloudflare" {}
resource "google_compute_firewall" "allow_cloudflare_ingress" {
name = "from-cloudflare"
network = "default"
source_ranges = ["${data.cloudflare_ip_ranges.cloudflare.ipv4_cidr_blocks}"]
allow {
ports = "443"
protocol = "tcp"
}
}
» Attributes Reference
-
cidr_blocks
- The lexically ordered list of all CIDR blocks. -
ipv4_cidr_blocks
- The lexically ordered list of only the IPv4 CIDR blocks. -
ipv6_cidr_blocks
- The lexically ordered list of only the IPv6 CIDR blocks.