Skip to content

b0bu/zscaler

Repository files navigation

zscaler_ip_prefixes

go test -v 
# module install
go get github.com/b0bu/zscaler
# pipeline install
go install github.com/b0bu/zscaler@vX.Y.Z

implementing this for tf where local.zscaler_ipv4_ranges can be used to update zscaler prefixes.

data "external" "zscaler_ranges" {
  program = ["zscaler"]
}

locals {
  zscaler_ranges = toset(split(" ", data.external.zscaler_ranges.result.prefix_list))
  zscaler_ipv4_ranges = [
    for cidr in local.zscaler_ranges : cidr
    if can(cidrnetmask(cidr))
  ]
}