Skip to main content

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

Address Groups with purpose = CLOUD_ARMOR require the project to be enrolled in Cloud Armor Enterprise. Without it, you cannot create or modify address groups. If you downgrade, all security policies referencing address groups will be frozen (read-only).

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:
For production environments, prefer creating a custom role with only the necessary permissions, rather than assigning broad roles like roles/editor.

Address Group Limits & Quota

The capacity of an address group cannot be changed after creation. Plan your value carefully before deploying.
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, use gcloud:

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

Notes