AZ-104 Monitor and Maintain Azure Resources Practice Question
You need to retain Azure Firewall logs for long-term analysis in a Log Analytics workspace and also archive them in a storage account for compliance. What should you configure on the Azure Firewall resource?
⚠ Common exam trap
Test-takers frequently confuse resource locks or VNet peering with logging configurations, but only diagnostic settings provide the dual-destination log routing required for both analysis and compliance archival.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Diagnostic settings
Diagnostic settings on the Azure Firewall resource allow you to stream platform logs and metrics to a Log Analytics workspace for long-term analysis and to a storage account for archival and compliance. This is the only configuration that simultaneously supports both destinations for the firewall's log data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Diagnostic settings
Why this is correct
Diagnostic settings are the Azure-native mechanism that directs Azure Firewall logs, such as the application, network, and DNS proxy rule logs, to a monitoring destination like a Log Analytics workspace, storage account, or Event Hub. By enabling diagnostic settings, you can set custom retention periods for log retention and use KQL queries for long-term analysis. Without this, the firewall only retains logs for the fixed, brief period defined by the service itself.
- ✗
A resource lock
Why it's wrong here
A resource lock is an Azure management control that prevents accidental deletion or modification of a critical subscription, resource group, or resource by setting a CanNotDelete or ReadOnly scope. This lock enforces governance and audit policy but never interacts with telemetry or log pipelines. While it might protect the firewall's configuration, it does not affect where the firewall's logs are sent or how they are retained for long-term analysis.
When this WOULD be correct
A resource lock would be correct if the question asked: 'You need to prevent accidental deletion of an Azure Firewall configuration. What should you configure?'
- ✗
An availability set
Why it's wrong here
An availability set is an Azure construct that groups virtual machines into fault domains and update domains to guarantee that a subset of VMs remains online during planned maintenance or hardware failures. It is purely a resiliency feature for VM placement and has no responsibility for capturing, exporting, or analyzing log data. In the context of Azure Firewall, it is irrelevant and cannot perform any retention or export role.
When this WOULD be correct
When a question asks how to ensure high availability for a set of virtual machines running a critical application, configuring an availability set would be the correct answer to protect against hardware failures and planned maintenance.
- ✗
A VNet peering connection
Why it's wrong here
VNet peering is a networking feature that connects two Azure virtual networks, enabling traffic to route between them with low latency over Microsoft's backbone. It is used exclusively for network connectivity and routing, not for data collection or monitoring. Peering has no bearing on Azure Firewall logs, and enabling or removing peering will not produce or store any log analytics data.
When this WOULD be correct
You need to enable communication between two virtual networks that are in different regions or subscriptions, and you want to route traffic through Azure Firewall. VNet peering would be configured to connect the networks, with the firewall as a central inspection point.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Diagnostic settingsCorrect answer▾
Why this is correct
Diagnostic settings are the Azure-native mechanism that directs Azure Firewall logs, such as the application, network, and DNS proxy rule logs, to a monitoring destination like a Log Analytics workspace, storage account, or Event Hub. By enabling diagnostic settings, you can set custom retention periods for log retention and use KQL queries for long-term analysis. Without this, the firewall only retains logs for the fixed, brief period defined by the service itself.
✗A resource lockWrong answer — click to see why▾
Why this is wrong here
A resource lock prevents accidental deletion or modification of the Azure Firewall resource, but it does not configure log retention or archiving to Log Analytics or storage accounts.
★ When this WOULD be the correct answer
A resource lock would be correct if the question asked: 'You need to prevent accidental deletion of an Azure Firewall configuration. What should you configure?'
Why candidates choose this
Candidates may confuse resource locks with retention policies, thinking a lock can help preserve logs, or they may mistakenly believe that locking the resource also locks its associated data.
✗An availability setWrong answer — click to see why▾
Why this is wrong here
An availability set is used to distribute virtual machines across fault and update domains for high availability. It does not manage log retention or archiving for Azure Firewall.
★ When this WOULD be the correct answer
When a question asks how to ensure high availability for a set of virtual machines running a critical application, configuring an availability set would be the correct answer to protect against hardware failures and planned maintenance.
Why candidates choose this
Candidates may confuse availability set with a feature that ensures data availability or retention, mistakenly thinking it applies to log storage rather than VM redundancy.
✗A VNet peering connectionWrong answer — click to see why▾
Why this is wrong here
VNet peering is used to connect virtual networks, not to configure logging or archiving of Azure Firewall logs. Diagnostic settings on the firewall resource are required to send logs to Log Analytics and storage.
★ When this WOULD be the correct answer
You need to enable communication between two virtual networks that are in different regions or subscriptions, and you want to route traffic through Azure Firewall. VNet peering would be configured to connect the networks, with the firewall as a central inspection point.
Why candidates choose this
Candidates may confuse network connectivity features with logging and archiving capabilities, or think that peering is needed to send logs across networks.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Azure Firewall
Azure Firewall is a cloud-based network security service that protects your virtual networks in Microsoft Azure by filtering traffic based on rules you define.
Key term
Firewall
A firewall is a network security system that monitors and controls incoming and outgoing traffic based on predetermined security rules to protect trusted internal networks from untrusted external networks.
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.