Azure Policy helps you enforce rules and effects on your resources so they stay compliant with your organization's standards.
Click to reveal answer
beginner
What is a policy definition in Azure Policy?
A policy definition is a set of rules that describe what is allowed or denied on Azure resources.
Click to reveal answer
beginner
What does assigning a policy mean in Azure Policy?
Assigning a policy means applying the policy definition to a specific scope like a subscription or resource group to enforce compliance.
Click to reveal answer
intermediate
What is a policy initiative in Azure Policy?
A policy initiative is a collection of multiple policy definitions grouped together to simplify management and assignment.
Click to reveal answer
intermediate
How does Azure Policy help with resource compliance?
Azure Policy evaluates resources and flags those that don't meet the rules, helping you identify and fix non-compliant resources.
Click to reveal answer
What is the main purpose of Azure Policy?
ATo manage user identities
BTo monitor network traffic
CTo deploy virtual machines
DTo enforce rules on Azure resources for compliance
✗ Incorrect
Azure Policy is designed to enforce rules and ensure resources comply with organizational standards.
Which of the following is a scope where you can assign an Azure Policy?
AResource group
BVirtual machine
CStorage account
DAzure DevOps pipeline
✗ Incorrect
Policies are assigned at scopes like management groups, subscriptions, or resource groups, not individual resources.
What is a policy initiative in Azure Policy?
AA group of policy definitions
BA single rule for resources
CA virtual machine template
DA network security group
✗ Incorrect
A policy initiative groups multiple policy definitions to simplify management.
What happens when a resource is non-compliant with an Azure Policy?
AIt is automatically deleted
BIt is converted to a different resource type
CIt is flagged for review
DIt is moved to another subscription
✗ Incorrect
Azure Policy flags non-compliant resources so you can take corrective action.
Which Azure service is primarily used to enforce organizational standards on resources?
AAzure Monitor
BAzure Policy
CAzure Active Directory
DAzure DevOps
✗ Incorrect
Azure Policy is the service used to enforce rules and governance on Azure resources.
Explain how Azure Policy helps maintain governance in an Azure environment.
Think about how rules keep things organized and safe.
You got /4 concepts.
Describe the difference between a policy definition and a policy initiative in Azure Policy.
One is a single rule, the other is a collection.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of Azure Policy in cloud governance?
easy
A. To monitor network traffic in real-time
B. To create virtual machines automatically
C. To enforce rules and ensure resources comply with organizational standards
D. To backup data to external storage
Solution
Step 1: Understand Azure Policy's role
Azure Policy is designed to enforce rules on resources to keep them compliant with company rules.
Step 2: Compare options to this role
Only To enforce rules and ensure resources comply with organizational standards describes enforcing rules and compliance, which matches Azure Policy's purpose.
Final Answer:
To enforce rules and ensure resources comply with organizational standards -> Option C
Quick Check:
Azure Policy = Enforce rules [OK]
Hint: Azure Policy controls rules, not resource creation [OK]
Common Mistakes:
Confusing Azure Policy with Azure Monitor
Thinking Azure Policy creates resources
Mixing Azure Policy with backup services
2. Which JSON element is required to specify the action Azure Policy should take when a rule is violated?
easy
A. "effect"
B. "then"
C. "if"
D. "condition"
Solution
Step 1: Identify the JSON structure of Azure Policy
Azure Policy uses "if" to define conditions and "then" to specify what happens, but the specific action is defined by "effect".
Step 2: Confirm the element that defines the action
The "effect" element tells Azure Policy what to do, like deny or audit, when the condition is met.
Final Answer:
"effect" -> Option A
Quick Check:
Action in Azure Policy = effect [OK]
Hint: "effect" defines the action in Azure Policy JSON [OK]
Common Mistakes:
Confusing "then" with the action element
Using "condition" instead of "if"
Missing the "effect" element entirely
3. Given this Azure Policy snippet, what will happen if a storage account is created without encryption enabled?
A. The value "false" should be a boolean false, not a string
B. The "effect" should be "audit" instead of "deny"
C. The "field" name is incorrect for encryption
D. The policy is missing a "parameters" section
Solution
Step 1: Check the data type of the "equals" value
The policy uses "equals": "false" which is a string, but encryption.enabled is a boolean.
Step 2: Correct the data type to boolean
Changing "false" (string) to false (boolean) fixes the condition to match properly.
Final Answer:
The value "false" should be a boolean false, not a string -> Option A
Quick Check:
Boolean false, not string "false" fixes policy [OK]
Hint: Use boolean false, not string "false" in conditions [OK]
Common Mistakes:
Using string "false" instead of boolean false
Changing effect to audit instead of deny
Assuming field name is wrong without checking
5. You want to create an Azure Policy that audits virtual machines which do not have a specific tag named "Environment". Which effect should you use to only report non-compliance without blocking resource creation?
hard
A. "deny"
B. "deployIfNotExists"
C. "append"
D. "audit"
Solution
Step 1: Understand the requirement to report but not block
You want to find resources missing the tag but still allow creation.
Step 2: Identify the effect that audits without blocking
The "audit" effect reports non-compliance but does not prevent resource creation.