Your company has an Azure environment with a management group hierarchy. You are designing a governance strategy to enforce the following compliance requirements:
1. All newly created or updated Azure Storage accounts must have 'Minimum TLS version' set to 'TLS 1.2'. If a storage account is deployed without this configuration, Azure must automatically configure it to TLS 1.2 during deployment.
2. Any attempt to deploy a Virtual Machine without a cost center tag named 'CostCenter' must be blocked.
You need to design the Azure Policy definitions to meet these requirements.
Which two policy effects should you recommend?
- ModifyAnswer
- DenyAnswer
- CDeployIfNotExists
- DAudit
Answer
The correct policy effects to recommend are Modify and Deny.
The Modify effect is the correct choice for the first requirement because it allows the policy engine to add or alter properties of the storage account (such as setting the minimum TLS version) during creation or update. The Deny effect is the correct choice for the second requirement because it actively blocks any resource deployment request that does not meet the specified condition (having the CostCenter tag), thereby preventing non-compliant virtual machines from being deployed.
Step-by-Step Solution
Key Concept
Azure Policy effects determine how resources are evaluated and governed. The Modify effect changes properties of resources during creation or update, while the Deny effect blocks non-compliant resource deployments. Correctly aligning policy effects to business requirements ensures compliance with minimum administrative overhead.