Azure Policy DeployIfNotExists Remediation for SQL TDE
Short answer
SQL1: Yes, because the DeployIfNotExists policy in Resource Group 3 automatically remediates and enables Transparent Data Encryption. SQL2: No, assuming the ARM template explicitly disables it or the policy remediation is not active/triggered for this specific instance in the scenario context.
Question
You have an Azure subscription that contains the resources shown in the following table.

Transparent Data Encryption (TDE) is disabled on SQL1.
You assign policies to the resource groups as shown in the following table.

You plan to deploy Azure SQL databases by using an Azure Resource Manager (ARM) templates. The databases will be configured as shown in the following table.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Key Takeaways
The main trap is confusing Deny policies (which block creation) with DeployIfNotExists policies (which allow creation but fix compliance asynchronously).
This page explains how Azure Policy's DeployIfNotExists effect automatically enables Transparent Data Encryption on SQL1 via Resource Group 3, resulting in a Yes selection.
Common mistake: Learners often select No for SQL1, believing that because the initial state or template didn't have TDE, it remains disabled. They fail to account for the automatic remediation performed by the DINE policy.
Expert Analysis
The governing principle here is Azure Policy's enforcement mechanism, specifically the difference between 'Deny' and 'DeployIfNotExists' (DINE) effects. A DINE policy does not prevent resource creation; instead, it triggers an asynchronous remediation task that configures the resource to comply with the policy after deployment. If a remediation task is enabled, the policy engine automatically applies the required configuration, such as enabling Transparent Data Encryption (TDE), even if the ARM template or initial configuration did not include it.
For SQL1, which resides in Resource Group 3, the attached policy is a DINE effect for TDE. Since the question implies standard remediation practices (and comments confirm this behavior), SQL1 will have TDE enabled automatically by the policy engine. Therefore, the statement that SQL1 has TDE enabled is true because the policy remediates the gap.
For SQL2, located in Resource Group 2, the policy is also a DINE effect. However, the critical detail is whether the ARM template explicitly enables TDE. The prompt states TDE is disabled on SQL1 but does not explicitly state the TDE setting in the ARM template for SQL2. In Azure, if an ARM template does not specify TDE settings, it defaults to disabled unless overridden by policy. Since DINE policies remediate after deployment, if the template doesn't enable it, the policy should fix it. However, exam logic often distinguishes between explicit configuration and policy remediation. If the statement asks if TDE is enabled by the template, the answer is No. If it asks if TDE is enabled on the resource, the answer is Yes due to policy. The provided comment suggests SQL1 is Yes. Typically, SQL2 might be configured differently or the question hinges on whether the policy actually runs. Without explicit remediation status for RG2, we look at the template. If the template doesn't set it, and policy is DINE, it gets fixed. But often these questions test if you know DINE is asynchronous. Let's assume the standard interpretation: SQL1 is remediated (Yes). SQL2 might be No if the template explicitly disables it or if the policy isn't applied yet. However, based on the single comment provided which only addresses SQL1, we focus on the DINE mechanic. The key insight is that DINE = Automatic Remediation.
Therefore:
- SQL1: Yes (Policy remediates TDE).
- SQL2: Likely No or Yes depending on specific template details not fully visible, but typically if the template doesn't enforce it and policy is DINE, it becomes Yes. However, if the question implies the template disables it, DINE still fixes it. Let's stick to the strongest signal: DINE enables TDE automatically.
Official Reference
- https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assessment-state#deployifnotexists
- https://learn.microsoft.com/en-us/azure/sql-database/transparent-data-encryption-azure-sql
These links open the official vendor documentation in a new tab.
Exam Strategy
When analyzing Azure Policy scenarios, always identify the policy effect first. If it is 'DeployIfNotExists', remember that resources are created successfully, but a background task will configure them to match the policy definition. Look for keywords like 'remediate' or 'automatic configuration' in the question stem to confirm if remediation tasks are active. Do not assume the resource is non-compliant just because the initial template or default state differs from the policy.
Frequently Asked Questions
Does DeployIfNotExists block resource creation if the policy is violated?
How do I know if TDE will be enabled on my SQL database?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
techman243 👍 1Yes, Yes, No SQL1 will have TDE enabled automatically. SQL1 is in RG3. Since RG3 has a DeployIfNotExists policy for TDE, Azure Policy will remediate the resource and enable TDE automatically.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SC-500 Questions
Access 100 questions with complete answers and detailed explanations.
View Full SC-500 Practice Test →