Overview
Use Address Groups in Google Cloud Armor Enterprise to manage a centralized IP deny list, reusable across multiple security policies. This guide covers integrating the OneFirewall WCF Agent with Cloud Armor Enterprise Address Groups for automated dynamic updates to the deny list.Prerequisites
Cloud Armor Enterprise
The GCP project must be enrolled in the Enterprise tier. On downgrade, security policies referencing address groups become read-only until those rules are removed.
Terraform Provider
The
google_network_security_address_group resource requires the google-beta provider. Make sure it is configured in your Terraform setup.Required IAM Permissions for the Service Account
The service account used by Terraform must have the following roles:Address Group Limits & Quota
To increase quota limits, the service account needs the
serviceusage.quotas.update permission, included in the Owner, Editor, and Quota Administrator roles. Requests can be submitted from the GCP Console under IAM & Admin → Quotas.Step 1: Configure the google-beta Provider
terraform.tf
Step 2: Create the Address Group
address_group.tf
The
items field can also be managed externally via gcloud or the API, without re-running Terraform every time you add or remove an IP.Step 3: Create the Security Policy with the Deny Rule
security_policy.tf
Step 4: Attach the Policy to a Backend Service
backend.tf
Step 5: Update the Deny List Without Terraform
To add or remove IPs dynamically, without going through Terraform, usegcloud:
Step 6: Reuse the Address Group Across Multiple Security Policies
The same address group can be referenced by multiple security policies simultaneously:multi_policy.tf
Step 7: Handle a CDN with Masked IP (X-Forwarded-For)
multi_policy.tf

