Back to Terraform

Azure Edge and Governance: Front Door, DNS, Monitor and Policy

November 6, 2026 Wasil Zafar 30 min read

Coordinate delivery policy, telemetry and Azure administrative controls around observable requirements

Table of Contents

  1. Choose Front Door, Application Gateway or Cloudflare Responsibilities
  2. Verify DNS and Certificate Scope at the Edge
  3. Send Diagnostics to an Explicitly Owned Destination
  4. Distinguish Azure Policy, RBAC and CI Approval Gates
  5. Exercise a Harmless Alert and a Denied Configuration

Choose Front Door, Application Gateway or Cloudflare Responsibilities

One hostname has one edge, and the edge is whichever layer terminates viewer TLS and answers from cache. DNS only returns a lookup and the origin only produces a body. Everything between them is a delivery decision, and each decision needs exactly one owner. Draw the chain before the first resource block exists, because the second owner is always discovered during an incident.

Azure offers three real options, and they sit at different scopes. Front Door is a global anycast entry point with caching, WAF and origin health probes. Application Gateway is a regional reverse proxy that lives in a VNet subnet. Cloudflare's proxy is a zone-level edge that can front either of them. Choosing by product name instead of by scope is what produces a chain nobody can debug.

Front Door owns the viewer-facing edge when a public workload serves several regions. It terminates TLS for custom domains, caches per route, attaches a WAF policy, and picks an origin group member by probe health and latency. The profile is a global resource, so the certificate, the firewall policy and the route share one control plane instead of one per regional stamp.

Standard and Premium are different products wearing one name. Standard provides custom WAF rules and caching; Premium adds managed rule sets, bot protection and Private Link origins. A design that assumes managed rules on a Standard profile fails when the firewall policy is created, not when traffic arrives, so the tier is a security decision rather than a billing detail.

The tier is a security decision

Standard and Premium are different products behind one name: managed rule sets, bot protection and Private Link origins sit in Premium. Choose the tier from the controls the workload needs, before the firewall policy exposes the gap at create time.

Application Gateway is the right owner when routing is regional and the backends are private. It reads path, host and header, terminates TLS with a certificate it can read from Key Vault, and reaches members inside the VNet. It does not cache responses and it is not anycast, so it cannot replace a global edge for a worldwide audience.

A second layer is legitimate when the two layers decide different things. Front Door in front of Application Gateway is a normal Azure chain: the global edge owns viewer TLS, cache and WAF, while the regional gateway owns path routing and private backend membership. The chain stays debuggable as long as the gateway does not also claim the cache.

Cloudflare in front of Front Door is a different proposition, because both layers terminate TLS and cache. Two certificates, two cache keys, two purge procedures and two log streams describe the same request. Keep that arrangement only for a capability the inner edge cannot supply, such as a zone-level ruleset, bot management, or an estate that already standardises on Cloudflare.

A proxy also changes what the inner edge can see. Viewer addresses become proxy addresses, so Front Door's access log, geographic rules and rate limits describe the intermediate hop rather than the person. A trusted client-address convention or a rule at the outer edge restores the information, and either one is a policy surface with an owner.

DNS-only use of Cloudflare is a genuinely clean split. If the zone lives at Cloudflare but the record is not proxied, Front Door remains the only edge and still owns TLS and cache, while Cloudflare owns the zone and its API. That is one owner per decision, which is the property that matters.

The Cloudflare provider changed the record surface in v5, and that is a boundary detail worth knowing. The resource is now cloudflare_dns_record, the name field expects the full FQDN, and the overwrite flag is gone. A duplicate record therefore fails loudly instead of being silently replaced, which is the behaviour you want when two roots could claim one name.

Traffic Manager is not a fourth edge. It answers DNS with a healthy endpoint and never terminates TLS or caches a byte, so it distributes names rather than requests. It belongs with the DNS owner, not with the delivery owner.

The decision reduces to four questions. Is the audience global, does the response benefit from caching, must the backend stay private, and which team already owns the zone? The first two point at a global edge, the third at a regional proxy or Private Link, and the fourth decides who is able to finish a certificate request.

Choose Front Door, Application Gateway or Cloudflare Responsibilities
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    H["Hostname and workload"] --> Z{"Who is authoritative
for the zone?"} Z -- "Cloudflare, proxy in use" --> C1["Cloudflare proxy
owns viewer TLS and cache"] C1 --> C2{"Is Front Door also
required?"} C2 -- "yes" --> X1["Two edges
two caches, two purges"] C2 -- "no" --> OK["One owner per decision"] Z -- "Azure DNS or DNS only" --> Q1{"Public internet
or VNet internal?"} Q1 -- "VNet internal" --> A1["Application Gateway v2
regional, private backends"] Q1 -- "public" --> Q2{"Audience in one
region or many?"} Q2 -- "one region" --> Q3{"Path or host routing
needed?"} Q3 -- "yes" --> A1 Q3 -- "no" --> L1["Load Balancer Standard
flows, no TLS decision"] Q2 -- "many regions" --> F1["Front Door profile
global edge, TLS and cache"] F1 --> Q4{"Managed WAF rules, bot
protection or Private Link?"} Q4 -- "yes" --> P1["Premium tier"] Q4 -- "no" --> S1["Standard tier
custom WAF rules only"] A1 --> OK P1 --> OK S1 --> OK L1 --> OK X1 --> BAD["Duplicate cache and
client-address ambiguity"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class H,Z,Q1,Q2,Q3,Q4,C2 primary; class C1,A1,F1,P1,S1,L1 secondary; class OK ok; class X1,BAD danger;

Read the diagram from the zone down. The zone owner decides whether an outer proxy exists at all; the workload's audience and network position decide between the global edge and the regional proxy; the feature list decides the tier. The red branch is the arrangement to avoid: two layers that both terminate TLS and both cache.

A hostname chain with one owner per decision, beside a valid two-layer chain and a duplicate-edge chain The visitor resolves the name in a DNS zone that holds the records and the validation token, reaches a single edge that terminates TLS, caches and runs the WAF, and reaches a private origin that decides the body. Below, Front Door in front of Application Gateway keeps one cache owner because the gateway only routes, while a Cloudflare proxy in front of Front Door creates two TLS terminators and two caches. One hostname, one owner per decision Visitor one request DNS zone record and validation Edge TLS, cache, WAF Origin decides the body requester zone team edge team application team Viewer TLS: exactly one terminator Cache key: exactly one owner Private response: the origin decides, not the edge Valid two-layer chain Front Door TLS and cache App Gateway routes, no cache Backend private Each layer answers a different question. The gateway must not begin caching, or the chain acquires a second purge procedure. Duplicate edge Cloudflare proxy Front Door second cache Origin sees the proxy Two TLS terminators, two caches, two purge paths, and one set of logs that names the intermediate address. A second layer is justified by a capability the inner edge lacks โ€” bot management, a ruleset language, a cross-cloud address. It is not justified by symmetry, and it is never free to purge.

Name the owner of every row you did not draw. The review artefact is a short list: zone owner, certificate owner, cache owner, WAF owner and client-address owner. When two rows name the same team you have a chain; when one row names two teams you have the next incident.

Verify DNS and Certificate Scope at the Edge

Custom-domain readiness is three separate states. DNS must point at the edge, the edge must have validated the name, and the edge must be serving a certificate for it. A record can be correct while validation is pending, and validation can be approved while the certificate is still deploying. Check all three in that order before blaming the application.

Three states, one hostname

DNS must point at the edge, the edge must validate the name, and a certificate must be deployed. Each state can lag the others, so test them in order and stop at the first one that is false.

Every custom domain is validated with a TXT record. Front Door issues a value for a record named _dnsauth under the hostname, and the domain stays pending until that value resolves. The domain validation state also times out after seven days, which turns a forgotten record into a stalled release rather than an error message.

In Azure DNS, a subdomain routes with a CNAME while an apex routes with an alias. The CNAME points at the endpoint hostname, and the apex has no CNAME to give. Azure DNS solves that with an alias record that flattens the target, and Front Door recommends Azure DNS for exactly this case.

The alias record is not an A record with an edge address. Front Door does not publish a stable frontend address, and the documentation warns against pinning one in an A record because it can change. An alias record follows the profile instead of a number, so a platform change does not become a DNS outage.

Alias records need the network resource provider registered. The record type depends on the network provider even though the endpoint belongs to the CDN service, and a subscription that has never used networking rejects the write. That failure appears as a record apply error rather than as a resolution problem, which sends people to the wrong place.

The validation record belongs to the zone that is authoritative for the name. A delegated subdomain can live in a different zone from its parent, and the TXT record must exist in the delegated zone. Written at the parent, the record exists, is never queried, and the domain stays pending.

A proxy changes what the name resolves to, so validate through the TXT record. When Cloudflare proxies the record, the answer is a Cloudflare address rather than the Front Door hostname. The TXT proof does not depend on that answer, and using it avoids an argument about which edge the validation saw.

Certificate scope follows the consumer, and at the edge the consumer is the profile. A Front Door managed certificate belongs to one custom domain on one profile and is scoped to the name it validates. It is not a regional object, and it is not shared with an Application Gateway in the same subscription.

Managed certificates renew on a proof that has to stay published. Front Door rechecks the CNAME before rotating a subdomain certificate, and a domain with no CNAME is revalidated through the TXT token. The portal shows a pending revalidation state when the certificate is close to expiry, and regeneration is a manual step rather than a Terraform change.

Bringing your own certificate moves the scope into Key Vault. Front Door reads the certificate through a managed identity that needs the Key Vault Secrets User role, and the vault must be in the same subscription as the profile. A versionless secret reference is what allows a rotation without editing the configuration.

Application Gateway keeps its certificate in the gateway's region. The listener reads a Key Vault secret through a user-assigned identity, and the versionless secret id is what supports renewal. The same certificate therefore works at the global edge and at the regional gateway only if both consumers can read it, which is a permission question before it is a TLS question.

Cache scope is decided per route, not per hostname. A route can cache static paths and pass API paths through, and the query string behaviour is part of the cache key. The dangerous case is a route that caches a personalised response because the origin omitted a directive: Front Door honours private, no-cache and no-store when they are present, and chooses a duration of one to three days when they are absent.

Private responses are a negative test, not a configuration review. Request the same page from two sessions and compare the bodies, then read the cache status on the response. A shared body under two identities means the route is the defect, not the application.

Verify DNS and Certificate Scope at the Edge
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    D["Custom domain added
to the profile"] --> V{"Subdomain or apex?"} V -- "subdomain" --> C["CNAME to the endpoint
plus _dnsauth TXT"] V -- "apex" --> A["Alias record in Azure DNS
plus _dnsauth TXT"] C --> PX{"Record proxied by
another edge?"} PX -- "yes" --> TX["Validate with TXT
or leave DNS-only"] PX -- "no" --> S{"Validation state
approved?"} A --> S TX --> S S -- "no" --> F1["Pending or timeout
wrong zone or stale token"] S -- "yes" --> T{"Certificate source"} T -- "managed" --> M["Managed certificate
one host per domain"] T -- "Key Vault" --> K["Customer certificate
same subscription, identity role"] M --> R{"Proof still published
before renewal?"} R -- "no" --> F2["Pending revalidation
regenerate the TXT token"] R -- "yes" --> OK["Serve the hostname"] K --> OK F1 --> BLOCK["Traffic stops at
the custom domain"] F2 --> BLOCK classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class D,V,PX,S,T,R primary; class C,A,M,K secondary; class OK ok; class TX warn; class F1,F2,BLOCK danger;

Read the failure branches by their symptom. Pending usually means the record is in the wrong zone or the token was never published; a default certificate at the edge means the hostname never reached approval; a renewal that never happens on an apex means the TXT token was treated as a one-time setup step.

Version baseline. Behaviour was checked against Terraform CLI 1.17.1 and hashicorp/azurerm 5.13.0 on 6 November 2026, with cloudflare/cloudflare 5.28.1 where the zone is external. Where a product document outruns the provider schema, the schema decides what Terraform can express.

Send Diagnostics to an Explicitly Owned Destination

Diagnostic settings are a per-resource switch, and Azure Monitor starts with the edge logs off. Front Door access, health probe and WAF logs are not collected until a diagnostic setting names them. Metrics and the activity log exist without one, which is enough to see that something changed and not enough to see which request failed.

Name the destination before you name the categories. A workspace answers questions interactively, a storage account keeps cheap long-term evidence, and an event hub forwards to a security platform. Each is a different owner with a different retention and a different bill, so the setting is a contract rather than a checkbox.

Log Analytics is where an alert can be built. The workspace holds the access, health probe and WAF categories, and a scheduled query rule can turn a query into a page. Interactive retention runs from 30 to 730 days, and anything beyond 31 days is billed as retention rather than ingest.

A storage account is evidence, not a query surface. It receives JSON blobs and answers an audit months later, but it cannot join a request to a WAF block. Pair it with a workspace when compliance needs both, and let a storage lifecycle rule, not the diagnostic setting, decide when the blobs expire.

An event hub is a hand-off to another team. The security team's platform consumes the stream and the platform team owns the namespace, so the setting depends on a resource outside the application's state. That dependency belongs in the module contract, not in a comment.

Volume is decided by category, because category selection is the only filter at the source. Front Door does not offer a per-field filter in the diagnostic setting, and Application Gateway splits its output into access, performance and firewall categories. Access logs are the largest stream, health probe logs are small and decisive, and WAF logs are small until someone attacks the endpoint.

One category, one destination, one copy. Two settings that send the same category to the same workspace duplicate every row and double the ingest bill. Fan-out to two genuinely different destinations is a design; fan-out to the same destination twice is a copy-paste accident with a monthly cost.

A global resource still writes to a regional workspace. Front Door is global, but its logs land where the workspace lives, and that region is a residency and latency decision. Record the choice with the destination, because "global" is not a data-residency answer.

Permissions split across two resources. Writing the setting needs monitoring write on the target and write on the destination, and reading the logs needs a role on the workspace. A team that can deploy the application but cannot read its own edge logs will debug by asking another team to run queries.

Discover categories instead of hardcoding them. The provider exposes a data source that lists the categories a resource supports, which keeps a provider upgrade from silently dropping a name. That matters at the edge, where category names have changed across product generations.

The health probe log is the one to enable first. It says which origin a point of presence could not reach, which separates an origin outage from a WAF block or a routing mistake. Access logs show the status the viewer received, and the tracking reference joins those entries to the WAF decisions.

Retention and cost belong to the destination owner. Ingest is charged per gigabyte, retention per gigabyte-month, and alert rules per rule. A workspace that keeps everything for two years because nobody chose is a budget line without an owner.

Distinguish Azure Policy, RBAC and CI Approval Gates

Three controls answer three different questions, and none substitutes for another. Azure Policy decides what may exist, RBAC decides who may call the operation, and a CI approval decides whether this particular change proceeds. A design that leans on one of them for another's job has a gap that only an incident will find.

Azure Policy is evaluated by Azure Resource Manager, not by Terraform. A deny assignment returns a 403 before the request reaches the resource provider, and the error names the assignment and the definition that blocked it. terraform plan never calls that evaluation, so a green plan followed by a denied apply is a normal pair.

Policy is not in the plan

Azure Policy is evaluated by Resource Manager at write time, not by Terraform during plan. A clean plan and a denied apply are therefore a normal pair, and only an apply against a scoped sandbox proves the assignment allows the change.

Policy is the only one of the three that constrains a Contributor. A person with Contributor can create anything the policy allows, from the portal, the CLI or a pipeline. If a rule must hold against every human with write access, it has to be a policy assignment, because a workflow gate is not in that path; a resource lock covers deletion specifically.

The assignment scope is the blast radius. Management group, subscription, resource group and individual resource are four different promises. An assignment at the management group covers every subscription below it, including the sandbox somebody created last week, and an exclusion deserves the same review as the rule.

Enforcement mode is not the same as the effect. With enforcement disabled, resources are still evaluated, but the effect does not run and no refusal reaches the activity log. That is the safe way to stage a deny rule: measure first, enable second, and keep the measurement as the evidence for the change.

Exemptions are time-bound and audited; disabling enforcement is not. A waiver or mitigated exemption names an assignment, a category and an expiry, so it reads as a decision with an end date. Turning enforcement off at the assignment quietly removes the control for every resource in scope, which is why it belongs to the platform owner.

RBAC is checked at the operation, not at the resource shape. Contributor can create a profile with any tier, any origin and any diagnostic setting the policy allows; it cannot grant access to another identity. User Access Administrator grants roles and Resource Policy Contributor writes assignments, which is why both are platform roles rather than team roles.

RBAC failures appear in two places. A read failure arrives during plan refresh as a 403 on a data source or a managed resource; a write failure arrives during apply on the specific operation. The first looks like a broken provider and the second names the scope, so the error text is what tells them apart.

The CI gate is a workflow control, and it only covers the workflow. A plan policy step reads the JSON plan and rejects shapes the organisation forbids; an approval step requires a human before apply. Both are real controls, and both are bypassed by anyone who applies from a laptop with Contributor.

Plan policy and Azure Policy do not share a rule language. A plan gate sees the proposed attributes and can be tested in the same pull request, while Azure Policy sees the API request and the tenant's assignments. Duplicating a rule in both is normal; assuming that one implements the other is not.

An approval needs a named reviewer and a recorded decision. An environment protection rule is only meaningful when the reviewer sees the plan artifact, the target subscription and the compliance state. An approval that asks "ok?" without those three is a formality with a timestamp.

Order the gates by what they can see. Plan policy first, because it fails in seconds; approval second, because it is a human; apply third, where RBAC and Policy decide; compliance scan last, to catch drift and out-of-band changes. Each stage answers a question the previous one could not.

ControlQuestion it answersWhere it decidesFailure signatureTime-bound exception
Azure PolicyMay this resource exist in this shape?Resource Manager, before the providerRequestDisallowedByPolicy, naming assignment and definitionExemption with a category and an expiry
RBACMay this identity perform this operation?Resource Manager authorization on every request403 naming the operation and the scopeEligible assignment or a PIM window
CI plan policyDoes this plan break our rules?Pipeline, on the plan JSONJob fails before apply, with no Azure callReviewed override in the pipeline
CI approvalShould this change proceed now?Pipeline, before applyJob waits for a reviewerBreak-glass run with an audit trail
Resource lockMay this resource be deleted?Resource Manager, for every identityDelete fails for Owner and Contributor alikeRemove the lock, deliberately

Read the table across a row, not down a column. The owner and the failure text are what let an on-call engineer name the control that refused the change. An access denial from RBAC and a policy denial are different investigations with different fixes, even when both arrive as a 403.

Gates along one change, and what each one does when it refuses A change passes a CI gate that runs plan policy and requires approval, then Resource Manager authorization, then Azure Policy evaluation, then the resource provider. Beside each gate is its refusal behaviour: the gate blocks with no API call, RBAC returns 403 naming the scope, Policy returns RequestDisallowedByPolicy naming the assignment, and compliance records the result after the fact. A portal edit by a Contributor skips the CI gate entirely. Each gate refuses in its own way THE CHANGE WHAT HAPPENS AT THAT POINT Change proposed a pull request and a plan A portal edit reaches the same place and records no plan at all. Nothing in the pipeline knows it happened. CI gate plan policy and approval Job fails before any Azure call, so state and subscription are unchanged and the only evidence is the run log. RBAC who may call the operation 403 on a read during plan refresh, or on a write during apply. The message names the operation and the scope, never the rule. Azure Policy what may exist 403 with RequestDisallowedByPolicy, naming the assignment and the definition that refused the request. Resource provider applies the request Compliance is recorded after the fact, so an audit finding arrives without having stopped anything. A Contributor passes RBAC and skips the CI gate. Only a policy assignment or a resource lock constrains that person. Exemptions and enforcement mode change the answer without changing the identity.

The uncomfortable case is the change nobody proposed. A portal edit by a Contributor passes RBAC, is evaluated by Policy, and never touches the CI gate. Only a policy rule, a lock or a post-change alert sees it, which is why the design starts with what must hold without the pipeline.

Exercise a Harmless Alert and a Denied Configuration

Two exercises prove the controls instead of describing them. The first sends one log row from the edge to a workspace and turns it into a notification. The second asks Azure Policy to refuse a configuration, then changes the rule and watches the same change succeed.

Lab

Exercise a Harmless Alert and a Denied Configuration

Status: design-only. No Azure subscription or credential was used to produce this article, and these steps were not executed here. Versions: Terraform CLI 1.17.1, hashicorp/azurerm 5.13.0, and cloudflare/cloudflare 5.28.1 if the zone is external, checked 6 November 2026.

Prerequisites. A sandbox subscription, a resource group you are allowed to delete, a Front Door Standard profile with one endpoint and one origin, a Log Analytics workspace owned by the observability team, an action group that reaches you, and permission to assign a policy at resource group scope. Use one lab hostname and no customer traffic.

Part A โ€” prove one log row and one alert.

  1. Enable the categories. Attach a diagnostic setting from the profile to the workspace, with the access and health probe categories and no metric fan-out.
  2. Generate a known request. Send a small burst to the endpoint hostname and write down the start and end time.
  3. Find the row. Query the access category filtered to the CDN provider and the lab hostname, and count rows per minute for the burst window.
  4. Build the rule. Create a scheduled query rule on the same query, scoped to the workspace, with a threshold above zero and a short evaluation frequency.
  5. Attach the action group. Fire one more request and record the notification, including the time between request and delivery.
  6. Disable the rule. Leave the diagnostic setting in place and turn the alert off, so the lab cannot page anyone twice.

Part B โ€” a denied configuration.

  1. Write the rule. Define a custom deny policy that requires an owner tag on resources in the lab scope, and assign it at the resource group with enforcement enabled.
  2. Propose a non-compliant change. Add a Front Door profile without the tag and apply. Expect a 403 that names the assignment and the definition.
  3. Check what was created. List state and the resource group. The refused profile should appear in neither, because the request never reached the provider.
  4. Satisfy the rule. Add the tag and apply again. The same plan should now succeed, which proves the rule rather than the tool was the blocker.
  5. Change the enforcement. Set the assignment's enforce argument to false, remove the tag, and apply. The resource is created while compliance still reports it as non-compliant.
  6. Compare an exemption. Restore enforcement and add a time-bound exemption instead. The resource is created, the exemption has an expiry, and the audit trail says who asked for it.
CheckEvidence to collectPass conditionFailure signal
Log arrivalQuery result for the burst windowOne row per request within the expected delayCategory enabled but no rows
Alert deliveryNotification time and rule historyOne notification, then silence after disableRepeated pages after the rule is off
Policy denialApply error text403 naming assignment and definitionCreated resource with no error
Refused stateState list and resource groupThe profile appears in neitherA partial resource exists
Enforcement offCompliance view after applyResource exists and is non-compliantResource still refused
ExemptionExemption record with expiryCreated, with an owner and an end datePermanent exclusion with no expiry

Expected observation. A request appears in the access category within the normal ingestion delay, the scheduled rule fires once, and the notification reaches the action group. The first policy apply fails before the provider, the tagged retry succeeds, and disabling enforcement converts the same refusal into a compliance finding. The exemption produces a third outcome with a visible end date.

Failure checks. The lab fails if the workspace receives rows but the alert never fires, which points at the rule scope rather than the diagnostic setting. It fails if the denied apply leaves a resource behind, which points at a policy that audits instead of denies. It also fails if the exemption and the disabled assignment are indistinguishable in the audit trail, because then nobody can tell a decision from an omission.

Cost dimensions. The Front Door base fee dominates a short lab, with request and egress meters on top. Workspace ingest is charged per gigabyte, retention beyond the included period per gigabyte-month, and each scheduled rule per month. The policy assignment itself has no charge, which is why the expensive part of governance is usually the telemetry, not the rule.

Cleanup. Delete the alert rule and the action group, remove the diagnostic setting, delete the policy assignment and the exemption, then destroy the profile and the lab resource group. Keep the workspace if the observability team owns it, and keep the query and the screenshots as evidence rather than keeping the resources alive.

Evidence to keep. The query and its time window, the notification timestamp, the full deny error text, the state list after the refusal, and the compliance view for both the disabled-enforcement and exemption runs. Store them with the change record, not with the credentials.

References (verified 6 November 2026):

  • azurerm_cdn_frontdoor_custom_domain: https://registry.terraform.io/providers/hashicorp/azurerm/5.13.0/docs/resources/cdn_frontdoor_custom_domain
  • azurerm_monitor_diagnostic_setting: https://registry.terraform.io/providers/hashicorp/azurerm/5.13.0/docs/resources/monitor_diagnostic_setting
  • azurerm_resource_group_policy_assignment: https://registry.terraform.io/providers/hashicorp/azurerm/5.13.0/docs/resources/resource_group_policy_assignment
  • Apex domains in Azure Front Door: https://learn.microsoft.com/en-us/azure/frontdoor/apex-domain
  • Azure Front Door domains and validation states: https://learn.microsoft.com/en-us/azure/frontdoor/domain
  • Azure Front Door caching: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-caching
  • Azure Policy deny effect: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-deny
  • Resolve RequestDisallowedByPolicy: https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-policy-requestdisallowedbypolicy

Next in the Series

In Operate AzureRM: Imports, Resource IDs, Upgrades and CI Recovery, we'll explore Maintain Azure infrastructure across API and provider changes with explicit ownership and no-change baselines.