Bicep Operations
Deploy Azure infrastructure using Bicep templates.
Operations
| Operation | Description |
|---|---|
Bicep.DeployToResourceGroup | Deploy a Bicep template to a resource group. |
Bicep.DeployToSubscription | Deploy a Bicep template at subscription scope. |
Bicep.WhatIf | Preview what would be deployed (what-if analysis). |
Bicep.Build | Compile a Bicep file to ARM JSON template. |
Example
Deploy infrastructure and capture outputs.
build.ando
// Preview changes first
Bicep.WhatIf("my-app-rg", "./infra/main.bicep", o => o
.WithParameterFile("./infra/params.prod.json"));
// Deploy and capture outputs for later steps
Bicep.DeployToResourceGroup("my-app-rg", "./infra/main.bicep", o => o
.WithParameterFile("./infra/params.prod.json")
.CaptureOutputs());
// Build Bicep to ARM for validation
Bicep.Build("./infra/main.bicep", "./artifacts/main.json");