PaloAltoNetworks / terraform-provider-panos

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

Panorama Device Group data object #284

Closed stobias123 closed 2 years ago

stobias123 commented 3 years ago

Describe the solution you'd like

I have a module which will push a standardized set of rules to a list of device groups.

Here's the relevant snippet.

resource "panos_panorama_security_rule_group" "linux-rules" {
    for_each = toset( var.device_groups )
    provider = panos.SLC-panorama
    device_group = each.key
    rulebase = "post-rulebase"
    ...

To validate user input, I'd like to access these device groups through a data block.

Using a panos_panorama_device_group data block will allow me to confirm the device groups exist within a terraform plan before I run an apply. Ref.

Describe alternatives you've considered

None I can think of. tf14 provides variable validation, but that isn't really an option for me here.