You are designing a governance strategy for an Azure environment. You need to implement an Azure Policy that enforces secure transport settings on Azure Cache for Redis instances. The policy must meet the following compliance requirements:
- Ensure that the minimum TLS version for all Redis instances is set to 1.2.
- If a new instance is deployed with an older version, or without specifying the version, the deployment must succeed, but the configuration must be automatically updated to enforce TLS 1.2.
- Existing non-compliant resources must be flagged in compliance reports but not modified automatically.
Which Azure Policy effect should you include in the policy definition to meet these requirements?
- ModifyAnswer
- BDeployIfNotExists
- CDeny
- DAudit
Answer
Modify
The correct answer is the Modify effect. The Modify effect allows Azure Policy to add, update, or remove properties or tags on a resource during creation or update. Since the requirement is to update the minimum TLS version property directly on the Azure Cache for Redis resource while allowing the deployment to succeed, the Modify effect is the most appropriate and efficient choice.
Step-by-Step Solution
Key Concept
Azure Policy effects determine the action taken when compliance rules are evaluated. The 'Modify' effect allows you to add, update, or remove properties directly on a resource during creation or update. In contrast, 'DeployIfNotExists' is used to deploy companion resources (like extensions or diagnostic logs) using ARM templates.