This project demonstrates Infrastructure as Code (IaC) deployment in Azure using Bicep templates a key AZ-104 and real-world cloud admin skill.
It automates the creation of a resource group-level environment containing:
- A Storage Account
- A Virtual Network (VNet) with one subnet
- Resource tagging for governance and cost tracking
Tenant (Entra ID) Subscription: Resource Group: RG-ARM-Automation Storage Account (Standard_LRS) Virtual Network (10.10.0.0/16) Subnet: default (10.10.1.0/24)
| File | Description |
|---|---|
main.bicep |
Main Bicep template deploying the resources |
parameters.json |
Template parameter values (location, prefix, environment) |
deploy.ps1 |
PowerShell deployment script |
deploy.sh |
Bash (Azure CLI) deployment script |
screenshots/ |
Folder for portal screenshots or CLI output |
'main.bicep' | Deploys a resource group-level environment containing a storage account and virtual network
@description('Location where all resources will be deployed') param location string = resourceGroup().location
@description('Prefix for resource names') param prefix string = 'wpitlab'
@description('Environment tag (e.g., Dev, Test, Prod)') param environment string = 'Dev'
// Create Storage Account resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = { name: '${prefix}st${uniqueString(resourceGroup().id)}' location: location sku: { name: 'Standard_LRS' } kind: 'StorageV2' tags: { Environment: environment Owner: 'AzureAdmin' } }
// Create Virtual Network resource vnet 'Microsoft.Network/virtualNetworks@2023-05-01' = { name: '${prefix}-vnet' location: location properties: { addressSpace: { addressPrefixes: [ '10.10.0.0/16' ] } subnets: [ { name: 'default' properties: { addressPrefix: '10.10.1.0/24' } } ] } tags: { Environment: environment } }
output storageAccountName string = storageAccount.name output vnetName string = vnet.name
'parameters.json' | Template parameter values (location, prefix, environment) |
{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { "location": { "value": "eastus" }, "prefix": { "value": "wpitdemo" }, "environment": { "value": "Dev" } } }
'deploy.ps1' | PowerShell deployment script |
$resourceGroupName = "RG-ARM-Automation" $location = "EastUS"
New-AzResourceGroup -Name $resourceGroupName -Location $location
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName
-TemplateFile "main.bicep" `
-TemplateParameterFile "parameters.json"
Get-AzResource -ResourceGroupName $resourceGroupName | Select Name, ResourceType, Location
'deploy.sh' | Bash (Azure CLI) deployment script |
#!/bin/bash
RESOURCE_GROUP="RG-ARM-Automation" LOCATION="eastus"
az group create --name $RESOURCE_GROUP --location $LOCATION
az deployment group create
--name "ARMDeployDemo"
--resource-group $RESOURCE_GROUP
--template-file main.bicep
--parameters @parameters.json
az resource list --resource-group $RESOURCE_GROUP -o table
Option 1: Azure CLI
az login
chmod +x deploy.sh
./deploy.sh
**Option 2: Azure PowerShell**
Connect-AzAccount
.\deploy.ps1
*Cleanup* | When finished, delete all resources with:
az group delete --name RG-ARM-Automation --yes --no-wait
# Skills Demonstrated
Azure Resource Manager (ARM) architecture
Bicep template authoring
Resource Groups, Storage, and Networking
Azure CLI and PowerShell automation
Resource tagging and governance