Managing Governance via Azure Policy
I’m Amir Rouhanipoor, an IT Consultant specializing in Azure and cloud solutions. I help organizations streamline their IT and drive growth through secure, efficient cloud technologies.
Search for a command to run...
I’m Amir Rouhanipoor, an IT Consultant specializing in Azure and cloud solutions. I help organizations streamline their IT and drive growth through secure, efficient cloud technologies.
No comments yet. Be the first to comment.
visit microsoft learn github for complete instructions This lab teaches you to automate Azure deployments using ARM and Bicep templates. You'll learn to create, edit, and deploy them using the Azure portal, PowerShell, and CLI. Interactive Simulation...
PowerShell Script for VM Size Comparison This script lists all session hosts with their host pool, VM name, and VM size across all host pools(loop through multiple resource groups): Connect-AzAccount # Get all host pools $hostPools = Get-AzWvdHostPo...
M03 - Unit 4: Configure an ExpressRoute Gateway Exercise Scenario To connect your Azure virtual network to your on-premises network using ExpressRoute, you must first create a virtual network gateway. A virtual network gateway serves two key purposes...
M02-Unit 3 Create and configure a virtual network gateway Scenario You will configure a VPN gateway to securely connect CoreServicesVnet (East US) and ManufacturingVnet (North Europe) using VNet-to-VNet VPN. Task 1: Create CoreServicesVnet and Manuf...
Introduction Azure ExpressRoute is a private, enterprise-grade connection that enables secure and reliable network connectivity between your on-premises infrastructure and Microsoft’s global network. It bypasses the public internet and provides high ...
You need to create three virtual networks: 1. CoreServicesVnet Region: East US Purpose: Main network (web services, databases, shared services like DC/DNS). Connectivity: Needs VPN connection to on-premises. Address Space: Large (because of expe...
Security-focused Cloud & Automation Engineer with a Master’s in Computer Science and 6+ years of experience automating and supporting enterprise IT environments across multi-site corporate and operational infrastructures. Proficient in Python scripting, Azure infrastructure, Windows Server, and identity management. Skilled in integrating third-party platforms, securing configurations, and streamlining operations. Currently pursuing the Cybersecurity Architect Expert certification with a strong focus on cloud security and automation.
This lab teaches you how to implement organizational governance using Azure Policy and resource tagging. You'll learn to enforce resource tagging, update existing resources, and use resource locks.
Improve Azure resource management by:
Applying resource tags for metadata.
Enforcing resource tags for new resources.
Updating existing resources with tags.
Using resource locks for protection.
Optional simulations:

Sign in to the Azure portal: https://portal.azure.com
Create a resource group (e.g., az104-rg2 in East US).
On the Tags tab, create a tag (e.g., Cost Center: 000).

Navigate to: Policy > Authoring > Definitions > find “Require a tag and its value on resources”
Click "Assign" and select your subscription and resource group.
Configure the assignment:
Assignment name Require Cost Center tag with Default value
DescriptionRequire Cost Center tag with default value for all resources in the resource group
Policy enforcement Enabled

Set parameters (e.g., Tag Name: Cost Center, Tag Value: 000).
Create the assignment.
Try creating a storage account without the tag to verify enforcement. you will get this error message:

Navigate to: Policy > Authoring > Assignments
Delete the previous assignment.
Assign the "Inherit a tag from the resource group if missing" policy.
Configure the assignment:
Assignment name Inherit the Cost Center tag and its value 000 from the resource group if missing
Description Inherit the Cost Center tag and its value 000 from the resource group if missing | | Policy enforcement Enabled
Set parameters (e.g., Tag Name: Cost Center).
Enable remediation task.
Policy to remediate : Inherit a tag from the resource group if missing
Create the assignment.
Create a storage account without the tag to verify automatic tagging.

Navigate to your resource group > Settings > Locks > Add
Create a lock (e.g., rg-lock with delete lock type).
Try deleting the resource group to verify the lock.

Delete the lab resources to avoid unnecessary costs.
Azure portal: Delete the resource group.
PowerShell: Remove-AzResourceGroup -Name resourceGroupName
CLI: az group delete --name resourceGroupName
Azure tags are key-value pairs used as metadata for resources.
Azure Policy enforces conventions and compliance for resources.
Remediation tasks bring non-compliant resources into compliance.
Resource locks prevent accidental deletion or modification.
Azure Policy is a pre-deployment security practice, while RBAC and resource locks are post-deployment.