Skip to content

Commit 4ea2027

Browse files
authored
Merge pull request #54012 from Rob-Barefoot/fundlp4m2
Initial commit: guided-project-organize-resources-tags-locks
2 parents 1add2b9 + 395dce4 commit 4ea2027

18 files changed

Lines changed: 541 additions & 0 deletions
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: "Introduction"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 2
14+
content: |
15+
[!include[](includes/1-introduction.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.exercise-create-resources-apply-tags
3+
title: Exercise - Create resources and apply tags
4+
metadata:
5+
title: Exercise - Create resources and apply tags
6+
description: "Exercise - Create resources and apply tags"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 7
14+
content: |
15+
[!include[](includes/2-exercise-create-resources-apply-tags.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.exercise-apply-resource-locks
3+
title: Exercise - Apply resource locks
4+
metadata:
5+
title: Exercise - Apply resource locks
6+
description: "Exercise - Apply resource locks"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 7
14+
content: |
15+
[!include[](includes/3-exercise-apply-resource-locks.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.exercise-test-lock-enforcement
3+
title: Exercise - Test lock enforcement
4+
metadata:
5+
title: Exercise - Test lock enforcement
6+
description: "Exercise - Test lock enforcement"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 6
14+
content: |
15+
[!include[](includes/4-exercise-test-lock-enforcement.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.validate-success
3+
title: Validate success
4+
metadata:
5+
title: Validate success
6+
description: "Validate success"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 2
14+
content: |
15+
[!include[](includes/5-validate-success.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.clean-up-resources
3+
title: Clean up resources
4+
metadata:
5+
title: Clean up resources
6+
description: "Clean up resources"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 5
14+
content: |
15+
[!include[](includes/6-clean-up-resources.md)]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.knowledge-check
3+
title: Knowledge check
4+
metadata:
5+
title: Knowledge check
6+
description: "Knowledge check"
7+
ms.date: 03/29/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 5
14+
content: |
15+
[!include[](includes/7-knowledge-check.md)]
16+
quiz:
17+
title: "Check your knowledge"
18+
questions:
19+
- content: "What is the primary purpose of applying resource tags in Azure?"
20+
choices:
21+
- content: "To restrict who can access a resource"
22+
isCorrect: false
23+
explanation: "Access control is managed through RBAC role assignments, not tags."
24+
- content: "To organize resources for cost tracking and management"
25+
isCorrect: true
26+
explanation: "Tags are key-value pairs that help you categorize resources for cost allocation, automation, and operational management."
27+
- content: "To prevent resources from being deleted"
28+
isCorrect: false
29+
explanation: "Resource locks prevent deletion, not tags."
30+
- content: "What does a read-only resource lock prevent?"
31+
choices:
32+
- content: "Only deletion of the resource"
33+
isCorrect: false
34+
explanation: "A delete lock prevents only deletion. A read-only lock is more restrictive."
35+
- content: "Modifications and deletion of the resource"
36+
isCorrect: true
37+
explanation: "A read-only lock prevents both changes and deletion. You can view the resource but cannot modify or delete it."
38+
- content: "All access to the resource including viewing"
39+
isCorrect: false
40+
explanation: "A read-only lock still allows you to view the resource. It blocks modifications and deletion only."
41+
- content: "What must you do before you can delete a resource that has a delete lock?"
42+
choices:
43+
- content: "Disable the lock temporarily using Azure Policy"
44+
isCorrect: false
45+
explanation: "Locks are not managed through Azure Policy. You must remove the lock directly."
46+
- content: "Contact Azure Support to override the lock"
47+
isCorrect: false
48+
explanation: "Lock removal does not require Azure Support. Authorized users can remove locks directly."
49+
- content: "Remove the lock first"
50+
isCorrect: true
51+
explanation: "You must explicitly remove a delete lock before you can delete the resource. This is a deliberate safeguard against accidental deletion."
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.guided-project-organize-resources-tags-locks.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: "Summary"
7+
ms.date: 03/25/2026
8+
author: wwlpublish
9+
ms.author: robbarefoot
10+
ms.topic: unit
11+
ms.custom:
12+
- N/A
13+
durationInMinutes: 2
14+
content: |
15+
[!include[](includes/8-summary.md)]
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
This guided project focuses on organizing and protecting Azure resources using tags and locks.
2+
3+
Tags are key-value pairs that you attach to resources and resource groups. They help you categorize resources for cost reporting, ownership tracking, and governance. Locks add a layer of protection that prevents accidental modification or deletion, even for users with full permissions.
4+
5+
## Scenario
6+
7+
Your development team is setting up a shared Azure environment and needs to keep resources organized and protected from accidental changes. You apply tags to track which department owns each resource, and then apply locks to prevent critical resources from being modified or deleted by mistake.
8+
9+
- Exercise 1 - Create resources and apply organizational tags.
10+
- Exercise 2 - Apply resource locks to prevent accidental changes.
11+
- Exercise 3 - Test lock enforcement and confirm the full lock lifecycle.
12+
13+
:::image type="content" source="../media/overview-architecture.png" alt-text="Diagram showing how tags and locks are applied to a resource group and storage accounts for organization and protection." border="false":::
14+
15+
By the end of this project, you can organize resources with tags, filter resources by tag value, and protect resources using both delete and read-only locks.
16+
17+
> [!NOTE]
18+
> This is a guided project module where you complete a project by following step-by-step instructions.
19+
20+
## Skilling areas
21+
22+
In this project, you practice skills in the following areas:
23+
24+
**Apply and use resource tags**
25+
+ Tag resource groups and individual resources with key-value pairs.
26+
+ Apply different tag values to distinguish departments or environments.
27+
+ Filter resources by tag in the portal.
28+
29+
**Configure resource locks**
30+
+ Apply a delete lock to prevent resource removal.
31+
+ Apply a read-only lock to prevent modifications.
32+
+ Understand how locks at different scopes interact.
33+
34+
**Test and manage lock enforcement**
35+
+ Verify that locked operations are blocked with appropriate error messages.
36+
+ Remove locks and confirm that normal operations are restored.
37+
38+
> [!IMPORTANT]
39+
> This project uses the Azure portal for every step. No prior Azure experience is required.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
This guided project consists of the following exercises:
2+
3+
- **Create resources and apply tags**
4+
- Apply resource locks
5+
- Test lock enforcement
6+
7+
In this exercise, you create a resource group with two storage accounts and apply organizational tags to each one. You then use tag-based filtering to see how tags help you find and organize resources across a growing environment.
8+
9+
This exercise includes the following tasks:
10+
11+
- Prepare the environment
12+
- Create a test storage account
13+
- Tag the resource group
14+
- Tag the storage account
15+
- Create a second storage account with different tags
16+
- Filter resources by tag
17+
18+
**Outcome:** A resource group and storage account with consistent organizational tags applied.
19+
20+
> [!TIP]
21+
> Pause after each major action and confirm the page status before moving on. This habit prevents compounding mistakes.
22+
23+
## Task 1: Prepare the environment
24+
25+
Set up your Azure environment before you begin. You create a resource group and a test resource to practice tagging and locking.
26+
27+
> [!WARNING]
28+
> This project creates Azure resources that may incur charges. Complete the clean-up unit when you're done to avoid unintended expenses.
29+
30+
1. Sign in to the [Azure portal](https://portal.azure.com) with an account that has permissions to create and manage resources.
31+
2. In the portal search bar, search for **Resource groups** and select **Resource groups**.
32+
3. Select **+ Create**. Name the resource group **rg-gp-tags-locks**, choose your preferred region, and select **Review + create** then **Create**.
33+
34+
## Task 2: Create a test storage account
35+
36+
Create a low-cost storage account inside the resource group. This gives you a resource to tag and lock in the following exercises.
37+
38+
1. In the portal search bar, search for **Storage accounts** and select **Storage accounts**.
39+
2. Select **+ Create**.
40+
3. On the Basics tab, select **rg-gp-tags-locks** as the resource group.
41+
4. For **Storage account name**, enter a globally unique name (for example, **stgptagslock** followed by your initials and a number).
42+
5. For **Region**, use the same region as the resource group.
43+
6. For **Preferred Storage Type**, select **Azure Blob Storage or Azure Data Lake Storage Gen 2**.
44+
7. For **Performance**, select **Standard**.
45+
8. For **Redundancy**, select **Locally-redundant storage (LRS)**.
46+
9. Select **Review + create** and then select **Create**.
47+
10. When deployment finishes, select **Go to resource**.
48+
49+
## Task 3: Tag the resource group
50+
51+
Apply organizational tags to the resource group. Tags are key-value pairs that help you categorize resources, track costs by department or project, and enforce governance policies.
52+
53+
1. In the portal search bar, search for **Resource groups** and select **Resource groups**.
54+
2. Select **rg-gp-tags-locks** from the list.
55+
3. In the left menu, select **Tags**.
56+
3. Add the tag **department** with the value **development**.
57+
4. Add the tag **environment** with the value **test**.
58+
5. Select **Apply**.
59+
6. Confirm both tags appear in the tags list.
60+
61+
> [!NOTE]
62+
> **Validation step:** Verify the resource group displays both tags (**department: development** and **environment: test**) before proceeding.
63+
64+
> [!NOTE]
65+
> Each exercise includes validation steps like this one. Track your results as you go—you'll review them all in the validation unit at the end of this module.
66+
67+
## Task 4: Tag the storage account
68+
69+
Apply the same tags to the storage account. Tagging resources individually ensures accurate cost reporting even when multiple teams share a resource group.
70+
71+
1. Open the storage account you created.
72+
2. In the left menu, select **Tags**.
73+
3. Add the tag **department** with the value **development**.
74+
4. Add the tag **environment** with the value **test**.
75+
5. Select **Apply**.
76+
77+
> [!NOTE]
78+
> **Validation step:** Confirm the storage account now shows both tags matching the resource group tags.
79+
80+
## Task 5: Create a second storage account with different tags
81+
82+
Create another resource and assign different tag values. Having resources with different tags demonstrates how tags enable filtering and cost allocation across teams.
83+
84+
1. In the portal search bar, search for **Storage accounts** and select **Storage accounts**.
85+
2. Select **+ Create**.
86+
3. On the Basics tab, select **rg-gp-tags-locks** as the resource group.
87+
4. For **Storage account name**, enter a globally unique name (for example, **stgptagsops** followed by your initials and a number).
88+
5. For **Region**, use the same region as the resource group.
89+
6. For **Preferred Storage Type**, select **Azure Blob Storage or Azure Data Lake Storage Gen 2**.
90+
7. For **Performance**, select **Standard**.
91+
8. For **Redundancy**, select **Locally-redundant storage (LRS)**.
92+
9. Select **Review + create** and then select **Create**.
93+
10. When deployment finishes, select **Go to resource**.
94+
11. In the left menu, select **Tags**.
95+
12. Add the tag **department** with the value **operations**.
96+
13. Add the tag **environment** with the value **test**.
97+
14. Select **Apply**.
98+
99+
> [!NOTE]
100+
> **Validation step:** Verify the second storage account exists with **department: operations** and **environment: test** tags.
101+
102+
## Task 6: Filter resources by tag
103+
104+
Use tags to filter the resource list and see only the resources that belong to a specific department. This demonstrates the practical value of consistent tagging for managing resources at scale.
105+
106+
1. In the portal search bar, search for **Resource groups** and select **Resource groups**.
107+
2. Select **rg-gp-tags-locks** from the list.
108+
3. In the resource list, select **Add filter**.
109+
4. In the **Filter** dropdown, scroll down to **Tags** and select the **department** tag.
110+
5. In the **Operator** dropdown, select **Equals**.
111+
6. Select the checkbox next to **development** and select **Apply**.
112+
7. Confirm that only the **stgptagslock** storage account appears in the filtered list.
113+
8. Select the **X** on the right side of the filter to clear it, then repeat the steps above but select the checkbox next to **operations** instead.
114+
9. Confirm only the **stgptagsops** storage account appears.
115+
10. Select the **X** on the right side of the filter to clear it and show all resources again.
116+
117+
> [!NOTE]
118+
> **Validation step:** Confirm filtering by **department** tag shows only the correct storage account for each department value.

0 commit comments

Comments
 (0)