Blog
Jan 7, 2026 - 4 MIN READ
Deploying Azure Resources with VS Code

Deploying Azure Resources with VS Code

Utilizing a Bicep script template for resource deployment via VS Code, the Azure CLI, and Azure DevOps CD pipelines.

Radek Řezáč

Radek Řezáč

Deploying Azure resources consistently and repeatably is one of the core practices of a reliable data platform. Bicep — Microsoft's domain-specific language for Azure infrastructure — gives you a clean, declarative way to define resources and deploy them through VS Code, the Azure CLI, or a CI/CD pipeline.

Prerequisites

Before you start, install the following:

  • VS Code
  • VS Code Bicep extension — syntax highlighting, IntelliSense, and validation
  • VS Code Azure Tools extension — deploy directly from the editor

Typical Bicep Script Sections

A well-structured Bicep file is composed of five sections:

  • Parameters — values passed in at deployment time (environment name, SKU, etc.)
  • Variables — calculated or reused values derived from parameters
  • Resources — the Azure resources being deployed
  • Modules (optional) — reusable Bicep components for shared infrastructure patterns
  • Outputs — values returned after deployment (connection strings, resource IDs, etc.)

Create a Bicep Script from Existing Resources

If you already have resources provisioned in Azure, you can export them as a Bicep template directly from the Azure Portal: navigate to the resource, select Export template, and choose Download or Deploy. This gives you a starting point to clean up and parameterise.

Deployment Options

1. Deploy with the Azure CLI

az deployment group create \
  --name ExampleDeployment \
  --resource-group ExampleGroup \
  --template-file <path-to-bicep> \
  --parameters storageAccountType=Standard_GRS

This is the most common approach for local development and scripted deployments.

2. Deploy via VS Code

With the Azure Tools extension installed, right-click your .bicep file and select Deploy Bicep File. VS Code will prompt you for the target subscription, resource group, and any parameter values. Useful for quick iterations during development.

3. Deploy via Azure DevOps CD Pipeline

For production deployments, embed the az deployment group create command in an Azure DevOps pipeline stage. Use pipeline variables and variable groups to inject environment-specific parameter values, keeping your Bicep templates environment-agnostic.

- task: AzureCLI@2
  inputs:
    azureSubscription: '$(azureServiceConnection)'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: |
      az deployment group create \
        --resource-group $(resourceGroup) \
        --template-file infra/main.bicep \
        --parameters @infra/params.$(env).json

Visualization

The Bicep VS Code extension includes a Visualizer that renders your template as an interactive graph, showing all resources and their dependencies. This is especially useful for reviewing complex templates before deployment.

Radek Řezáč • Senior Lead Data Engineer • © 2026