Files
terraform-provider-unifi/templates/guides/multiple-site-firewall.md.tmpl

22 lines
1.0 KiB
Cheetah

---
subcategory: ""
page_title: "Manage Firewall Rules for Multiple Sites - Unifi Provider"
description: |-
An example of applying firewall rules to multiple sites.
---
# Manage Firewall Rules for Multiple Sites
The provider takes a default site value but all resources in the provider should allow overriding of the
site you are managing. In order to apply and manage a firewall rule across multiple sites, you simply
need to provide different values for the `site` attribute to `unifi_firewall_rule`:
{{ tffile "examples/multiple_site_firewall/firewall.tf" }}
You could optionally load lists of sites from JSON/CSV, variables, or other sources.
When you apply this configuration it will create the same firewall rule on every site in the list.
If you need to update the rule, you simply make an update to the rule definition and Terraform will
apply/update it across all the sites. If you add / or remove a site from the list, Terraform will also
handle creating or removing the rule on the subsequent `terraform apply`.