Table of Contents

Class BicepOperations

Namespace
Ando.Operations
Assembly
ando.dll

Provides Azure Bicep deployment operations for build scripts. Methods register steps in the workflow rather than executing immediately.

public class BicepOperations : OperationsBase
Inheritance
BicepOperations
Inherited Members

Constructors

BicepOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>)

Provides Azure Bicep deployment operations for build scripts. Methods register steps in the workflow rather than executing immediately.

public BicepOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory)

Parameters

registry StepRegistry
logger IBuildLogger
executorFactory Func<ICommandExecutor>

Methods

Build(string, string?)

Registers a step to compile a Bicep file to ARM JSON. Useful for validation or when you need the ARM template.

public void Build(string templateFile, string? outputFile = null)

Parameters

templateFile string

Path to the Bicep template file.

outputFile string

Optional output path. Defaults to templateFile with .json extension.

DeployToResourceGroup(string, string, Action<BicepDeployOptions>?)

Registers a step to deploy a Bicep template to a resource group. Returns a BicepDeployment object for accessing deployment outputs.

public BicepDeployment DeployToResourceGroup(string resourceGroup, string templateFile, Action<BicepDeployOptions>? configure = null)

Parameters

resourceGroup string

Target resource group name.

templateFile string

Path to the Bicep template file.

configure Action<BicepDeployOptions>

Optional configuration for deployment options.

Returns

BicepDeployment

A BicepDeployment object. Use deployment.Output("name") to get output references.

DeployToSubscription(string, string, Action<BicepDeployOptions>?)

Registers a step to deploy a Bicep template at subscription scope. Useful for creating resource groups and subscription-level resources. Returns a BicepDeployment object for accessing deployment outputs.

public BicepDeployment DeployToSubscription(string location, string templateFile, Action<BicepDeployOptions>? configure = null)

Parameters

location string

Azure region for the deployment metadata.

templateFile string

Path to the Bicep template file.

configure Action<BicepDeployOptions>

Optional configuration for deployment options.

Returns

BicepDeployment

A BicepDeployment object. Use deployment.Output("name") to get output references.

WhatIf(string, string, Action<BicepDeployOptions>?)

Registers a step to preview what would be deployed (what-if analysis). Does not actually deploy any resources.

public void WhatIf(string resourceGroup, string templateFile, Action<BicepDeployOptions>? configure = null)

Parameters

resourceGroup string

Target resource group name.

templateFile string

Path to the Bicep template file.

configure Action<BicepDeployOptions>

Optional configuration for deployment options.