AzureStatic-verified

Defender Plans that Are Actually On

A subscription with no Defender plan still has a full Defender for Cloud page: a Secure Score, hundreds of recommendations, a compliance dashboard - and not one threat detection, because those come from the paid plans, each Off until somebody turns it on. Sets Standard per resource type, always creates the security contact, and defaults alert notifications on.

terraformAzureazure

Compare Security Posture & Findings across clouds →

azure-defender-for-cloudvizier 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 "defender_for_cloud" {
  source  = "www.iac-bazaar.com/iac-bazaar/azure-defender-for-cloud/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.

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-defender-for-cloud

Microsoft Defender for Cloud with plans that are actually on. Works with Terraform and OpenTofu (>= 1.6), azurerm provider >= 4.0, < 5.0.

A subscription with no Defender plan still has a full Defender for Cloud page. Foundational CSPM is free and always on: a Secure Score, hundreds of recommendations, a compliance dashboard. What it does not have is a single threat detection - no alert on a brute-forced VM, no alert on malware uploaded to a storage account, no alert on an anomalous Key Vault read. Those come from the paid plans, per resource type, and each one is Off until somebody turns it on. From a screenshot, everything-Off and everything-On look alike.

The alerts have to go somewhere. A plan that is On raises alerts into the portal. Whether anybody hears about them is the security contact's alert_notifications setting - a separate resource that is easy to leave unmade. This module always creates the contact and defaults notifications on.

This module only ever sets Standard. A plan you do not list is left as it is, which on a fresh subscription is Free. The plans are priced per resource, so turning one on is a spending decision; enabled_plans is exported so a policy test can insist on a minimum set, and the module refuses an empty plan list without accept_no_plans.

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-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-waf-policy

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.

View module
Live-tested

azure-bastion-jumpbox

Bastion (Developer/Basic/Standard SKU) with optional hardened Linux VM, JIT-style NSG rules and boot diagnostics for secure VM access without public IPs.

View module
Live-tested

azure-entra-id-baseline

App registrations, service principals, groups and federated credentials (OIDC for GitHub/Terraform) - the identity plumbing every Azure org rebuilds by hand.

View module
Static validatedLive test pending

azure-pim

Azure defaults for an activation policy require MFA and a justification and no approval, so an eligible Owner activates alone at 3am with the reason fix; and eligibility itself is permanent unless somebody sets an end date. Manages the role policy per scope with approval required for Owner-class roles, gives every eligible assignment an expiry, and time-boxes the active ones kept for break-glass.

View module
Live-tested

azure-managed-identity

A map-driven module creating one or many user-assigned managed identities, each with optional workload identity federation (OIDC) and least-privilege RBAC role assignments - no secrets to rotate.

View module