AzureStatic-verified

A WAF Policy that Blocks rather than Narrates

Detection mode evaluates every rule, logs every match and forwards every request - the dashboard fills with blocked-looking entries while the backend receives them all. Prevention by default, Detection only by name. A policy attached to no listener protects nothing, so the attached listeners are an output; every exclusion is a hole and has to carry a reason.

terraformAzureazure

Compare WAF & Edge Security across clouds →

azure-waf-policyvizier v1.2.0

Verification

Static-verified

Passed: validated and lint-clean (provider-schema-validated for AWS/Azure/GCP; Terraform-language lint elsewhere).

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan tests (mocked: validation rules · outputs)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live test pending (no cloud run yet)

Last verified 2026-09-14 · how we verify

Use it from the registry

terraform · opentofu
module "waf_policy" {
  source  = "www.iac-bazaar.com/iac-bazaar/azure-waf-policy/azure"
  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 static-verified because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: static-verified](https://www.iac-bazaar.com/api/artifacts/azure-waf-policy/badge)](https://www.iac-bazaar.com/catalog/azure-waf-policy?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Terraform module 1.0.0, static-verified on IaC Bazaar: [A WAF Policy that Blocks rather than Narrates](https://www.iac-bazaar.com/catalog/azure-waf-policy?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```hcl
module "waf_policy" {
  source  = "www.iac-bazaar.com/iac-bazaar/azure-waf-policy/azure"
  version = "1.0.0"
}
```

Preview:IaC Bazaar: static-verified

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

azure-waf-policy

A shared Web Application Firewall policy for Azure Application Gateway that blocks rather than narrates. Works with Terraform and OpenTofu (>= 1.6), azurerm provider >= 4.0, < 5.0.

Detection mode is a smoke alarm with the siren cut. Every rule evaluates, every match is written to the log, the dashboard fills with blocked-looking entries - and the request is forwarded to the backend. Microsoft's guidance is to run Detection while tuning and switch to Prevention afterwards, which is reasonable, and which is also how policies stay in Detection for years: the switch is a one-word change nobody owns. This module defaults to Prevention and refuses Detection without accept_detection_mode = true.

A policy attached to nothing protects nothing. The policy is standalone; it takes effect only where an Application Gateway, listener or path rule references it, and it renders in the portal as a fully configured WAF either way. attached_listener_ids is an output so a test can check the policy is in front of something.

Every exclusion is a hole, so each one needs a reason. Azure gives exclusions no description field. This module requires one anyway and refuses an exclusion that is not explained - they are added under time pressure by whoever is on call, and the next person needs to know whether the false positive still exists.

A custom rule with action = "Log" is Detection mode for one rule. Allowed, and counted in log_only_rule_count.

Verification

Static validation runs tofu fmt, init, validate, tflint and checkov. This module has not yet had a live test, so it is published as statically validated with its live test pending and does not carry the live-tested mark.

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

Related modules

Static validatedLive test pending

azure-b2c

An Azure AD B2C tenant created where its customer directory should live, on PremiumP1 or P2, linked to the subscription that pays per monthly active user. Data residency and the onmicrosoft.com name are chosen once and cannot change; user flows, policies and app registrations are configured inside the tenant with an azuread provider pointed at the exported tenant ID.

View module
Static validatedLive test pending

azure-ddos-protection-plan

The plan is a fixed monthly charge of roughly three thousand dollars from the moment it exists, attached VNets or not; it protects only the VNets that reference it; and DDoS IP Protection on the addresses themselves is an order of magnitude cheaper for a handful. The charge accepted by name before the plan is created, the plan ID exported for azure-vnet, an output that says it bills unattached.

View module
Static validatedLive test pending

azure-firewall

Every security feature on this service defaults to telling you, not to stopping it: threat_intelligence_mode defaults to Alert, which logs traffic to known-malicious destinations and forwards it, and intrusion detection does the same. Deny for both here, with the DNS proxy on so FQDN rules and the client agree on an answer.

View module
Static validatedLive test pending

azure-entra-domain-services

Microsoft Entra Domain Services with NTLM v1, TLS 1.0 and RC4 off and Kerberos armoring on, the WinRM network security group the service insists on, the AAD DC Administrators group with the members you name, and the Domain Controller Services principal registered, all of which fail late when missing. Notifications go to the admins; filtered sync and LDAPS are inputs.

View module
Static validatedLive test pending

azure-purview

A Microsoft Purview account for the data map with public network access off, the managed Event Hub that bills monthly whether used or not turned off, a system identity, and Storage Blob Data Reader granted to that identity on every storage account it will scan, since a scan fails otherwise. The account bills for data map capacity from creation; public access is accepted by name.

View module
Static validatedLive test pending

azure-network-security-group

Every NSG carries default rules nobody wrote; a group with no subnet or NIC association is a rule set in the portal that filters nothing; and SSH and RDP from Internet are the first rules the portal offers. Your allows in priority order with an explicit DenyAllInbound at 4000, subnets associated by the module (none by name), 22 and 3389 from Internet refused unless accepted.

View module