Infra Gen
Infra Gen helps you effortlessly generate Azure resources using Infrastructure as Code (Bicep) and set up Azure DevOps pipelines with ease.
Features
- Generate Azure resources provision script (Bicep) and deployment pipeline (Azure DevOps).
- Generate Azure devops CI/CD pipeline template for web applications.
- Integrates with GitHub Copilot, enabling developers to interact with and generate infrastructure code through natural language conversations.
Supported Azure Resources
- App Service Plan
- App Service
- Application Insight
- Function
- KeyVault
- LogAnalytics Workspace
- Private Endpoint
- Resource Group
- Reids Cache
- SQL Server
- Service Bus
- Storage Account
- Azure Resource Group
Quick Start

Snippets
Typing az
to trigger a list of Bicep code snippets for quick insertion.

- az-resourceGroup > Azure Resource Group
- az-logAnalyticsWorkSpace > Azure LogAnalytics Workspace
- az-appInsight > Azure Application Insight
- az-appServicePlan > Azure App Service Plan
- az-app > Azure App Service
- az-keyVault > Azure KeyVault
- az-keyVault.privateEndpoint > Azure KeyVault Private Endpoint
- az-sqlserver > Azure SqlServer
- az-sqlserver.privateEndpoint > Azure SqlServer Private Endpoint
- az-functionApp > Azure Function
- az-storageAccount > Azure StorageAccount
- az-appService.privateEndpoint > AppService Private Endpoint
- az-storageAccount.privateEndpoint > Azure StorageAccount PrivateEndpoint
- az-redis > Azure Reids Cache
- az-servicebus > Azure Service Bus
- az-appsetting > Azure App Setting
- az-AllInOne > Azure resources bundled together
Infra Gen ❤️ Github Copilot

Requirements
- You must have an active Azure subscription
- Access to Azure DevOps is also required.
- GitHub Copilot Enterprise is required (Claude Sonnet 4 is recommended for best results).
FAQ
📢How to Get Started with the Infra Gen Extension for Beginners❓
✅ Step 1: Open a Workspace
Launch Visual Studio Code and open a folder to create or manage your project workspace.
The folder name should match the name of your code repository exactly.
This ensures consistency and avoids issues during deployment or version control.
✅ Step 2: Open the Command Palette
Press Ctrl + Shift + P
(or Cmd + Shift + P
on macOS) to open the Command Palette.
✅ Step 3: Generate Azure Infrastructure
Type > IAC: Generate Azure infrastructure as code
and select the command from the list to begin generating your infrastructure setup.
📢What is "Service name"❓
This is the name of the service for which you want to generate Infrastructure as Code (IaC) and set up CI/CD pipelines.
For example, if you're building a to-do web application, you might name the service todo
.
📢Is it possible to generate Infrastructure as Code (IaC) and CI/CD pipelines for multiple services❓
Yes, you can generate Infrastructure as Code (IaC) and CI/CD pipelines for multiple services. Simply enter multiple service names, separated by commas.
For example: todoreact,todoapi
📢What infrastructure and pipeline components will be created❓
devops
Folder
Infra Gen will create a devops
folder at the root of your workspace to organize DevOps-related assets.
common-IAC
Folder
It will download the core Bicep module from your company’s InnerSource repository to ensure standardized infrastructure definitions.
infrastructure
Folder
An infrastructure
folder will be created, containing:
main.bicep
– the main infrastructure definition file.
- A release pipeline for provisioning Azure resources.
Service-Specific Folders
For each service you define, a dedicated folder will be created. Each folder includes:
- A build pipeline.
- A release pipeline tailored to that service.
📢What tasks remain after the Infrastructure as Code (IaC) and CI/CD pipelines have been generated❓
There are several variables that need to be updated manually. These variables are marked with the keyword PLACEHOLDER
by default. You can easily locate all of them by searching for PLACEHOLDER
in your project files.
Variables
Variable |
Description |
Path |
azureSubscriptionId |
The unique identifier (GUID) of your Azure subscription where resources will be deployed. |
devops/infrastructure/variables.yml |
azureServiceConnectionName |
The name of the Azure service connection configured in your DevOps project. |
devops/infrastructure/variables.yml |
azureServiceConnectionServicePrincipalId |
The client ID of the service principal associated with the Azure service connection. |
devops/infrastructure/variables.yml |
projects |
The relative path to the .csproj file of the service you want to build and deploy. |
devops/[service]/build/variables.yml |
webContentFile |
the name of the build artifact (e.g., a .zip, .dll, or .jar file) that will be used during the deployment process. |
devops/[service]/release/pipeline.yml |
devopsProject |
the name of Azure Devops Project |
devops/[service]/release/variables.yml |
📢How do I add Infrastructure as Code (IaC) and CI/CD pipelines for an additional service❓
To add a new service using an existing CI/CD setup generated by the InfraGen extension, follow these steps:
Clone an Existing Service Folder
Duplicate one of the existing service folders created by InfraGen (e.g., todoreact
or todoapi
). This will serve as the base for your new service.
Update YAML Variables
Open the *.yaml
files inside the cloned folder and update the necessary variables.
✅ At a minimum, make sure to update the required variables listed above.
Modify Infrastructure Code
If you need to customize the infrastructure:
- Open the
main.bicep
file located in the infrastructure
folder.
- Start typing
az
to trigger IntelliSense in Visual Studio Code.
- VS Code will suggest code snippets for all available Azure resources, making it easy to insert and configure them.
It is recommended to use GitHub Copilot to streamline the steps above:
In Agent Mode, you can ask Copilot to perform actions like cloning folders, updating variables, or editing infrastructure code.
Example: “Add a new service using InfraGen. Use the existing todoapi
folder as a template.”
In Ask Mode, you can generate specific code snippets or commands by typing natural language prompts.
Example: “@infraGen/IaC generate a Bicep module for an Azure Function App.”
📢How do I use GitHub Copilot to interact with or invoke the Infra Gen extension❓
Infra Gen is supported in both Ask Mode and Agent Mode within GitHub Copilot Enterprise.
🔹 Ask Mode
- To use Infra Gen in Ask Mode, simply mention
@infraGen
followed by your question.
- GitHub Copilot will invoke the Infra Gen tool to provide relevant guidance.
- To generate infrastructure code directly, type the command:
/IaC
This will trigger the Infra Gen IaC command to generate infrastructure code based on your request.
🔹 Agent Mode
- In Agent Mode, you can ask your question naturally, then follow up with:
"Use Infra Gen tool."
- The agent will call the Infra Gen tool to provide instructions or generate code.
- ⚠️ This step is optional—most of the time, the agent can understand your codebase and provide suggestions without explicitly invoking Infra Gen.
- ⏳ Please note: Agent Mode may take longer to process your request compared to Ask Mode.
📢How do I report an issue❓
To report an issue, please use the following link. 🔗here
Known Issues
Track issue here
Release Notes
0.0.9
GitHub Copilot Integration
0.0.7
New IAC Template