USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAzure Cloud Book
HomeAzure BookInfrastructure and Delivery
PreviousProduction AI Lab: Build the Northstar Governed RAG AssistantNextTerraform on Azure: Providers, Modules, Remote State, Plans, Imports, and Drift
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

11 sections

Progress0%
1 / 11

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Azure Bicep and ARM from Zero: Repeatable Infrastructure

Bicep is Azure's declarative infrastructure language. You describe the desired Azure resources; Azure Resource Manager calculates dependencies and applies the deployment. Bicep compiles to ARM template JSON, removing much of the verbosity while preserving native Azure resource-provider support.

Lab: 45 minutes · Cost: Bicep/ARM deployment has no separate charge; declared resources do · Creates: resource group, storage account, and optional diagnostics.

What makes infrastructure declarative?

You state what should exist, not a sequence of portal clicks. Re-running a well-designed template with the same inputs converges on the same declared configuration. Azure still cannot automatically make every change safe; changing a name may replace a resource, and data-plane content is often outside ARM.

What is the smallest useful Bicep file?

bicep
targetScope = 'resourceGroup' @description('Azure region for the resources.') param location string = resourceGroup().location @minLength(3) @maxLength(24) param storageAccountName string resource storage 'Microsoft.Storage/storageAccounts@2025-01-01' = { name: storageAccountName location: location sku: { name: 'Standard_LRS' } kind: 'StorageV2' properties: { supportsHttpsTrafficOnly: true minimumTlsVersion: 'TLS1_2' allowBlobPublicAccess: false } } output storageId string = storage.id

Choose a current stable API version supported by the resource. Newest is not automatically safest; preview APIs need explicit justification.

How do you validate, preview, and deploy?

Ways to build

Choose the Azure tool you want to use. The underlying resource stays the same.

Azure CLI

bash
az bicep build --file main.bicep az bicep lint --file main.bicep az deployment group validate \ --resource-group "$AZURE_RG" \ --template-file main.bicep \ --parameters storageAccountName="$STORAGE_ACCOUNT" az deployment group what-if \ --resource-group "$AZURE_RG" \ --template-file main.bicep \ --parameters storageAccountName="$STORAGE_ACCOUNT" az deployment group create \ --resource-group "$AZURE_RG" \ --name "northstar-$(date +%Y%m%d%H%M%S)" \ --template-file main.bicep \ --parameters storageAccountName="$STORAGE_ACCOUNT"

Review what-if. It can contain noise and cannot predict every data-plane or runtime consequence, but it is an important gate.

Azure PowerShell

powershell
Test-AzResourceGroupDeployment ` -ResourceGroupName $AzureResourceGroup ` -TemplateFile ./main.bicep ` -storageAccountName $StorageAccount Get-AzResourceGroupDeploymentWhatIfResult ` -ResourceGroupName $AzureResourceGroup ` -TemplateFile ./main.bicep ` -storageAccountName $StorageAccount New-AzResourceGroupDeployment ` -ResourceGroupName $AzureResourceGroup ` -Name "northstar-$((Get-Date).ToString('yyyyMMddHHmmss'))" ` -TemplateFile ./main.bicep ` -storageAccountName $StorageAccount

How do modules improve design?

Split by stable ownership and reusable capability, not one file per resource. Example:

text
infra/ main.bicep modules/ network.bicep storage.bicep app.bicep observability.bicep environments/ dev.bicepparam prod.bicepparam

Publish mature modules to a private Bicep registry with versions. Keep environment differences in parameter files, but never commit secret parameter values.

How do scopes work?

Set targetScope to resourceGroup, subscription, managementGroup, or tenant. A subscription deployment can create resource groups and call modules at those group scopes. Use existing resources to reference shared infrastructure without trying to own its lifecycle.

What are conditions, loops, and dependencies?

Bicep infers dependencies when one resource references another. Use explicit dependsOn only when no reference expresses the real relationship. Conditions create optional components; loops create collections. Avoid a boolean forest that turns one template into many untestable architectures.

How are secrets handled?

Mark sensitive parameters with @secure(), but remember values can still reach target resource configuration and deployment operations. Prefer managed identity and Key Vault references. Never put listKeys() results in outputs. Limit who can read deployment history.

What are deployment modes and stacks?

Incremental resource-group deployment adds/updates declared resources and generally leaves undeclared resources. Complete mode has destructive behavior and requires great care. Azure deployment stacks provide managed-resource tracking and controlled deny/delete behaviors for supported scenarios. Test deletion semantics in a disposable subscription.

Production checks

  • Lint, format, and build.
  • Validate and what-if against the target scope.
  • Static policy/security analysis.
  • Deploy to an ephemeral environment.
  • Run resource and application tests.
  • Promote reviewed module versions.
  • Record deployment name, commit, parameters (non-secret), and outputs.
  • Protect production with approvals and separation of duties.

Official references

  • Bicep documentation
  • Bicep best practices
  • Deployment what-if
  • Azure deployment stacks