Questions tagged [azure-bicep]

Bicep is a Domain Specific Language (DSL) for deploying Azure resources declaratively. It aims to drastically simplify the authoring experience with a cleaner syntax and better support for modularity and code re-use. Bicep compiles down to standard ARM Template JSON files, which means the ARM JSON is effectively being treated as an Intermediate Language (IL).

Bicep is an alternative to using terraform as Infrastructure-as-Code to programmatically create, modify or destroy Azure resources.

A productive aspect of Bicep is the ability to take a snapshot of an existing Azure resource then compile that snapshot into the Bicep language to be used as a template from which to manage such a resource.

A common usage pattern is to execute your Bicep code in an Azure pipeline to engage its definitions to manage resources

688 questions
0
votes
1 answer

Azure ARM templates in Github Actions Keyvault Policies

I have a .bicep file which creates my cloud resources one of which is a new keyvault into which I am able to store connection strings from the different resources e.g ACR username/password, redis connection string, etc. The .bicep file is referenced…
0
votes
3 answers

Azure Bicep - Role assignment - Principal does not exist in the directory

I've created a Bicep template. In it I create a user-assigned identity and reference it in other resources like this var identityName = 'mid-dd-test' var roleName = 'TestRole' var roleDescription = 'Some test' var roleScopes = [ …
Alexander Schmidt
  • 5,631
  • 4
  • 39
  • 79
0
votes
1 answer

How to return output of module

I am creating two Azure App Services and 2 App Service Plans using For Loop but I need to pass the HostingPlanID from the AppService plan to each of the App Services, but I'm unable to access the output of the module. I'm getting the following…
JacksWastedLife
  • 254
  • 2
  • 15
0
votes
1 answer

Getting error trying to use Custome Cert with azure bicep

Here is my demo sandbox code how to deploy with Bicep. Im using custom certificate for this param profileName string = 'testresearchcdn' @allowed([ 'Standard_Verizon' 'Premium_Verizon' 'Custom_Verizon' 'Standard_Akamai' …
Abkade
  • 1
  • 2
0
votes
1 answer

Use Arrays and for-loops in BICEP

I am passing an array of services into the BICEP template param objectarray array =[] I also have an array variable that contains a subset of the service names that I passed in var objectarray = [ 'Abc' 'DEF' 'GHI' ] My intention is to see if the…
Amy
  • 185
  • 15
0
votes
1 answer

Deployment of Bicep fails on Visual Studio Code - Unexpected character encountered while parsing value: r. Path ''

I would like to deploy simple bicep for deploying Azure Storage. But I'm getting strange errors. Could it be that there is compatibility issues on Az or powershell? What commands solve the issue. New-AzResourceGroupDeployment -TemplateFile…
Kenny_I
  • 2,001
  • 5
  • 40
  • 94
0
votes
1 answer

I am getting a vmSize error when trying to deploy a batch service pool using bicep

I have the following Bicep code: resource pool 'Microsoft.Batch/batchAccounts/pools@2021-06-01' = { name: '${bs.name}/run-python' properties: { scaleSettings: { fixedScale: { nodeDeallocationOption: 'TaskCompletion' …
0
votes
1 answer

Bicep Template for Azure Automation Account. Azure Role assignment to Managed Identity problem

I have created a basic Bicep template to deploy Azure Automation Acount. It contains a Runbook with the Powershell script and the linked Schedule. So far so good. The problem is to assign the Azure Role (Owner, Contributor, Reader) to the Managed…
Rini
  • 3
  • 5
0
votes
1 answer

Bicep: unable to set storage account to web app resource

I've some experience using Azure CLI, Az Module and ARM templates... Anyway I'm experimenting problems in setting a storage account to a web app. This is the bicep source (still a work in progress): @allowed([ 'dev' 'qta' 'ppd' …
gsscoder
  • 3,088
  • 4
  • 33
  • 49
0
votes
1 answer

Azure Bicep - can't access output from external module

I have a module called "privateendpoints.bicep" that creates a private endpoint as follows: resource privateEndpoint_resource 'Microsoft.Network/privateEndpoints@2020-07-01' = { name: privateEndpointName location: resourceGroup().location …
Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
0
votes
2 answers

Azure Functionapp Deployment using Bicep: Properties object is not present in the request body

I am trying to deploy a new Azure FunctionApp using a bicep File to describe the resources using Infrastrucure-as-code. Here is the bicep file: param name string param location string = resourceGroup().location param serverFarmID string resource…
0
votes
1 answer

Set Retention Period for App Service logs in Azure WebApp Deployment

I am deploying a Azure WebService (Linux Container) with az CLI and Biceps files. Below is an excerpt from my logging configuration. resource appConfigLogs 'Microsoft.Web/sites/config@2021-02-01' = { name: 'logs' parent: app properties: { …
0
votes
1 answer

Replace, or relink?, existing Azure resource with ARM/Bicep

I have an existing Azure resource (Function App) with some dependencies (storage & ApService) it needs to run & for monitoring (AppInsights) as well as some things referenced by the functions (storage queues, tables, etc). All of this was created…
Andrew Connell
  • 4,939
  • 5
  • 30
  • 42
0
votes
1 answer

How to select and add multiple subnets of a VNet in networking section of an azure eventHub using bicep

How to select and add multiple subnets of a VNet in the networking section of an azure eventHub resource using azure bicep. // Create an event hub namespace var eventHubNamespaceName = 'evhns-demo1436' resource eventHubNamespace…
devops-admin
  • 1,447
  • 1
  • 15
  • 26
0
votes
1 answer

Why can't I loop twice in an Azure resource module?

I am trying to set up alerts in Azure bicep resources/modules. The goal is to have 3 files, one where the initial resource structure is created and parameterized: param metricAlertsName string param description string param severity int param…
agw2021
  • 266
  • 2
  • 22