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
registryStepRegistryloggerIBuildLoggerexecutorFactoryFunc<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
templateFilestringPath to the Bicep template file.
outputFilestringOptional 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
resourceGroupstringTarget resource group name.
templateFilestringPath to the Bicep template file.
configureAction<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
locationstringAzure region for the deployment metadata.
templateFilestringPath to the Bicep template file.
configureAction<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
resourceGroupstringTarget resource group name.
templateFilestringPath to the Bicep template file.
configureAction<BicepDeployOptions>Optional configuration for deployment options.