An Azure administrator applies a ReadOnly resource lock to an Azure resource group named rg-marketing. The resource group contains an Azure SQL Database logical server named sql-campaigns.
An operator who has the Owner role at the subscription level attempts to perform the following two tasks:
- Task 1: Add a new IP firewall rule to the sql-campaigns logical server.
- Task 2: Connect to a database on the sql-campaigns server and run a SQL query to retrieve data.
Which of the tasks will be permitted?
- ABoth Task 1 and Task 2
- BOnly Task 1
- Only Task 2Answer
- DNeither Task 1 nor Task 2
Answer
Only Task 2 is permitted.
The option stating that only Task 2 is permitted is correct. A ReadOnly resource lock prevents authorized users from deleting or modifying resources in the control plane. Adding a firewall rule is an update operation on the control plane, so it is blocked. However, resource locks do not affect data plane operations (the internal functions of a resource). Querying data within the SQL database is a data plane operation and is therefore allowed.
Step-by-Step Solution
Key Concept
Azure Resource Locks apply to control plane (management) operations but do not restrict data plane (resource function) operations. A ReadOnly lock blocks all update and delete actions on the control plane.