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.
Prerequisites
- Create a Azure subscription: Request GSSIT to create an Azure subscription with a Spoke-VNet configured as part of the network setup.
- Create a repository: Set up a Git repository in Azure DevOps to store and manage your source code.
- Set up Azure Service Connection: Configure a secure service connection in Azure DevOps to enable deployment to Azure resources.
- Clone the repo locally: Use Git to clone the repository to your local machine for development and version control.
Supported Azure Resources
- App Service Plan
- App Service
- Application Insight
- Function
- KeyVault
- LogAnalytics Workspace
- Private Endpoint
- Resource Group
- Reids Cache
- 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

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.
✅ Step 4: Sync Common-IAC Repository (Optional)
If you need to manually sync the common-IAC repository, open the Command Palette and type > IAC: Sync Bicep Modules from Remote Repository. This will clone the repository to ./devops/common-IAC and remove the .git folder for clean integration.
📢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.
If needed, you can manually sync this repository later using the command: IAC: Sync common-IAC repository
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.”
📢How do I use GitHub Copilot to interact with the Infra Gen extension❓
- In Agent Mode, you can ask questions naturally about your infrastructure code.
- GitHub Copilot can understand your codebase and provide suggestions for improvements, modifications, and best practices.
📢How do I report an issue❓
To report an issue, please use the following link. 🔗here
Known Issues
Track issue here
Release Notes
0.2.0
Improve github copilot instructions
Add command to sync remote bicep module
0.1.0
GitHub Copilot Custom Chat Modes
0.0.9
GitHub Copilot Integration
0.0.7
New IAC Template