PaloAltoNetworks / terraform-provider-panos

Terraform Panos provider
https://www.terraform.io/docs/providers/panos/
MIT License
87 stars 70 forks source link

url-filtering is invalid #214

Closed clanbc closed 4 years ago

clanbc commented 4 years ago

When using an External Dynamic List within a security policy I get the following error:

panos_security_policy.sec-policy-trust-to-untrust: security -> rules -> web-traffic -> profile-setting -> profiles -> url-filtering is invalid

Environment details:

panos_edl outputs it's name value as string which panos_security_policy is expecting, so i'm unsure why this is erroring.

The terraform plan works, The same security rule in the gui works.

Minimum code to repoduce:

resource "panos_edl" "whitelist" {
  name        = "whitelist"
  type        = "url"
  source      = "http://valid-whitelist-domain/whitelist.txt"
  repeat      = "every five minutes"
}

resource "panos_security_policy" "x" {
  rule {
    name                  = "test"
    source_zones          = ["${panos_zone.zone-trust.name}"]
    source_addresses      = ["10.0.0.0/8"]
    source_users          = ["any"]
    hip_profiles          = ["any"]
    destination_zones     = ["${panos_zone.zone-untrust.name}"]
    destination_addresses = ["any"]
    applications          = ["any"]
    services              = ["service-http", "service-https"]
    categories            = ["any"]
    url_filtering         = "${panos_edl.whitelist.name}"
    action                = "allow"
  }
}
shinmog commented 4 years ago

This param does not take an EDL as input, but rather an Objects > Security Profiles > URL Filtering.

I think you are looking for the categories param; that one can take an EDL.

shinmog commented 4 years ago

Closing as this seems to be resolved...