Google CloudLive-testedattested

Cloud Armor Security Policy (WAF)

A global Cloud Armor WAF policy with preconfigured OWASP SQLi and XSS rules enforcing by default, an optional per-client rate limit, and custom IP allow/deny rules - attachable to many backends.

terraformGoogle Cloudgcp

Compare WAF & Edge Security across clouds →

Part of: GCP Production Landing Zone

gcp-cloud-armorvizier v1.2.0

Verification

Live-tested

Really deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan test superseded by live test

Provenance

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-06-30 · how we verify

Verify this download

cosign · sha-256

Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.

# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub

# 2. This module's Sigstore bundle
curl -o gcp-cloud-armor-1.0.0.sigstore.json \
  https://www.iac-bazaar.com/api/artifacts/gcp-cloud-armor/signature

# 3. Verify the tarball you downloaded
cosign verify-blob \
  --key cosign.pub \
  --bundle gcp-cloud-armor-1.0.0.sigstore.json \
  gcp-cloud-armor-1.0.0.tar.gz
# → Verified OK

# 4. (optional) confirm the checksum too
echo "7814c7c6158d58ccc1518b5601a2edb7e2c64777069fb357bee3640c1327c578  gcp-cloud-armor-1.0.0.tar.gz" | sha256sum -c

Use it from the registry

terraform · opentofu
module "cloud_armor" {
  source  = "www.iac-bazaar.com/iac-bazaar/gcp-cloud-armor/gcp"
  version = "1.0.0"
}

Needs a registry token from /account/tokens. The module itself is free; the account is what identifies you. Full setup: registry docs.

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/gcp-cloud-armor/badge)](https://www.iac-bazaar.com/catalog/gcp-cloud-armor?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Terraform module 1.0.0, live-tested on IaC Bazaar: [Cloud Armor Security Policy (WAF)](https://www.iac-bazaar.com/catalog/gcp-cloud-armor?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```hcl
module "cloud_armor" {
  source  = "www.iac-bazaar.com/iac-bazaar/gcp-cloud-armor/gcp"
  version = "1.0.0"
}
```

Preview:IaC Bazaar: live-tested

Inputs & outputs

Create a free account to read this module's contract

The declared contract - every input name, type, default and description, plus every output - is shown to signed-in accounts, not to anonymous visitors.

A free account sees the contract of every module in the catalogue. There is no subscription and nothing to buy - the modules are free to download, and they run under Vizier.

Documentation

gcp-cloud-armor

A standalone Cloud Armor security policy — a global WAF for HTTP(S) backend services — with a mandatory default rule and the preconfigured OWASP Core Rule Set WAF rules (SQL injection, cross-site scripting and the Log4j CVE-2021-44228 / log4shell cve-canary rule) wired in, plus an optional per-client rate-limit rule. The policy is not attached to any backend; reference its name from a backend service's security_policy field so one policy can guard many backends. Works with Terraform and OpenTofu (>= 1.6), Google provider >= 7.0, < 8.0.

Secure defaults:

  • SQLi, XSS and log4shell (cve-canary) preconfigured WAF rules on and enforcing (deny(403)), not in preview — flip waf_preview = true to tune sensitivity first.
  • Default rule allows traffic so attaching the policy never black-holes a backend; switch default_rule_action to a deny for a default-deny allowlist.
  • Adaptive Protection (L7 DDoS) is opt-in — it needs Cloud Armor Enterprise.

Upgrade notes

  • The Log4j / log4shell (cve-canary) rule is now enabled by default at priority 1002, enforcing waf_action (default deny(403)). If you are upgrading a policy that already has a rule at priority 1002, move that rule or set waf_log4j_priority to a free slot before applying. Set enable_waf_log4j = false to opt out of the rule entirely.

Requirements

RequirementVersion
Terraform / OpenTofu>= 1.6
hashicorp/google>= 7.0, < 8.0

The Compute Engine API (compute.googleapis.com) must be enabled in the project.

License

Commercial — IaC Bazaar EULA. © IaC Bazaar. Original work (not derived from a third-party module).

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • Usage
  • Inputs
  • Outputs

Related modules

Static validatedLive test pending

gcp-firewall-policy

A global network firewall policy exists independently of any network; an association puts it in the path, and a policy with a hundred rules and none governs nobody while rendering as fully configured. enable_logging defaults to false on every rule, so a deny that fires leaves no evidence. Refuses a policy with no network, logs every rule unless told not to, and counts the disabled ones.

View module
Static validatedLive test pending

gcp-service-perimeter

spec is the dry-run configuration and status is the enforced one - two blocks of the same shape, and a perimeter with only a spec is evaluated on every request, logs violations, and blocks nothing. Empty restricted_services is the other way to have none: the perimeter exists, covers the projects, and governs no API.

View module
Static validatedLive test pending

gcp-dlp

Sensitive Data Protection on a schedule: an inspection template naming the detectors and a weekly trigger over a bucket or a BigQuery table, sampling ten percent of each file, scanning only what changed since the last run, with findings written to your dataset without the matched values and a summary sent to Security Command Center. A full scan, billed per byte, is accepted by name.

View module
Static validatedLive test pending

gcp-recaptcha

A key with a testing score returns that score for every assessment, bots included - right for staging and, on a production key, a filter that filters nothing; allow_all_domains lets any site consume your assessments against your quota. Testing mode refused without acceptance, domains required on web keys, invisible scoring by default; only a backend assessment call turns a token into a decision.

View module
Static validatedLive test pending

gcp-secure-web-proxy

A gateway with no rules allows nothing, and a session matcher of true is an open proxy to the internet; the gateway needs a proxy-only subnet in the region that is yours to make; and without TLS inspection the proxy sees the SNI hostname and nothing inside. Rules built from a URL list of your hosts, allow-all accepted by name only, outputs that say what is allowed and that TLS is not inspected.

View module
Static validatedLive test pending

gcp-cloud-ids

Creating the endpoint creates no packet mirroring policy, so an endpoint with nothing mirrored is provisioned, billed by the hour, shown with a green check and has never seen a packet. The mirroring policy is created with it and refused when it mirrors nothing. Cloud IDS detects and never blocks; blocks_traffic is an output that is always false.

View module