This project demonstrates a complete CI/CD pipeline using Azure DevOps to deploy Infrastructure as Code (IaC) with Bicep.
The pipeline automatically validates and deploys Azure infrastructure whenever code changes are pushed to the repository.
Infrastructure deployed in this project:
- Azure Resource Group
- Azure Storage Account
This project shows how DevOps practices enable automated, repeatable, and version-controlled infrastructure deployments.
The following diagram shows the overall architecture of the system.
flowchart LR
A[Developer] --> B[Azure Repos]
B --> C[Azure DevOps Pipeline]
C --> D[Validate Bicep Template]
D --> E[Deploy Infrastructure]
E --> F[Azure Resource Group]
F --> G[Azure Storage Account]
The workflow below explains the pipeline execution process.
flowchart TD
A[Developer Push Code] --> B[Azure Repos]
B --> C[Pipeline Triggered]
C --> D[Stage 1: Validate Bicep Template]
D --> E[az bicep build]
E --> F[Stage 2: Deploy Infrastructure]
F --> G[Create Resource Group]
G --> H[Deploy Bicep Template]
H --> I[Azure Storage Account Created]
azure-devops-bicep-iac-pipeline
│
├── bicep
│ ├── main.bicep
│ └── parameters.json
│
├── pipelines
│ └── azure-pipelines.yml
│
├── screenshots
│ ├── Azure Resource Group + Storage Account.png
│ ├── Pipeline stages view.png
│ ├── pipeline.png
│ └── Repo structure in Azure Repos.png
│
└── README.md
The Bicep template creates an Azure Storage Account inside a Resource Group.
Main template file:
bicep/main.bicep
Parameter file:
bicep/parameters.json
The parameters file contains values used during deployment.
Pipeline configuration file:
pipelines/azure-pipelines.yml
The pipeline performs two main stages.
This stage validates the Bicep template.
az bicep build --file bicep/main.bicep
This ensures the infrastructure code compiles successfully.
This stage deploys Azure resources.
az group create
az deployment group create
Deployment results in:
Resource Group
bicep-rg
Storage Account
devopsbicepsa001
Location
East US
The pipeline automatically triggers when changes are pushed to the main branch.
However, documentation updates should not trigger deployments.
trigger:
branches:
include:
- main
paths:
exclude:
- README.md
This prevents unnecessary pipeline executions.
- Azure DevOps
- Azure Repos
- Azure Pipelines
- Bicep
- Azure CLI
- Git
- Infrastructure as Code (IaC)
- Infrastructure as Code (IaC)
- Automated CI/CD pipelines
- Cloud infrastructure automation
- YAML pipeline configuration
- Version-controlled deployments
Pavan Kumar Gummadi
DevOps Engineer



