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
2
votes
1 answer

Azure Bicep: Cannot reference a child resource to a parent resource as an array

Resource Type Microsoft.Cdn/profiles/originGroups/origins Api Version 2021-06-01 I'm trying to deploy Azure Front Door for multiple Azure App Services with custom domain names. I am able to deploy multiple custom domain names and associate them…
iMAN
  • 57
  • 4
2
votes
1 answer

bicep: how to deploy resource conditionally only if it does not exists

I have following issue: I want to deploy storage account, only if it does not exist. I check the existence with az cli deployment script: resource checkStorageAccountExistence 'Microsoft.Resources/deploymentScripts@2020-10-01' = { name:…
Wojtas.Zet
  • 636
  • 2
  • 10
  • 30
2
votes
1 answer

Output parameters for user-assigned-identity in bicep?

I'm trying to retrieve the Client ID of a Managed Identity created with Azure Bicep. But the documentation doesn't give any information about the output parameters. Am I missing something? How can I retrieve the client id after defining the Managed…
Enrico
  • 2,734
  • 1
  • 27
  • 40
2
votes
0 answers

Creating / managing Azure Active Directory B2C with a Service Principal

I'm in the process of setting up a Bicep-based pipeline to provision and manage the infrastructure for an application, and I am currently running into an obstacle with the AAD B2C tenant. I have sorted out the basics of deploying a B2C tenant from…
2
votes
1 answer

Github azure/arm-deploy actions fails when a new bicep version is available

The github action fails when using github action azure/arm-deploy to deploy a bicep template on a github hosted agent because bicep writes an output to stderr indicating there is a new version. The action fails as soon as something was send to…
2
votes
1 answer

The secret of KeyVault parameter '' cannot be retrieved. Http status code: 'Forbidden'. Error message: 'Access denied to first party service

We have a Azure DevOps pipeline that we are using to deploy infrastructure to Azure using bicep files. In Azure, We have create a App Registration Service Principle and added it as a contributor to our Subscription, which we use as a Service…
Ross
  • 2,463
  • 5
  • 35
  • 91
2
votes
1 answer

Install Bicep cli in coporate laptop error

I am trying to install bicep cli, I am using coporate laptop, I get the following error I tried with and without VPN and get the same error: My Azure CLI version is: 2.44.1 and I am using windows 10 Error while attempting to retrieve the latest…
MJ X
  • 8,506
  • 12
  • 74
  • 99
2
votes
1 answer

Is there a way to get multiple non-related IP addresses configured in an Azure SQL Server Firewall using Bicep?

I am looking to whitelist multiple IP Addresses for an MS Azure SQL Server Firewall using a Bicep template. I've already configured the SQL server module, now I am looking to add/configure the firewallRules resource. I've used JSON parameter files…
2
votes
2 answers

How to deploy windows Azure App Service with .Net stack using Bicep?

I've created a Bicep to deploy Service Plan and App Service with linux/windows selection and .net 6 stack. Both deployments successful, Linux App is totally fine, .net 6 stack is present on Portal. However, Windows stack is empty on Portal screen. I…
2
votes
1 answer

Bicep Template ~ Create directories in ADLS

I'm trying to transition from Terraform with the azurerm provider to Bicep and having a tohgh time figuring out how to use Bicep to populate my required ADLS Gen 2 directory structure. Many of my builds need a new ADLS with lots of containers, then…
Indrid
  • 962
  • 4
  • 25
  • 39
2
votes
1 answer

Configure Azure function authentication using Arm or Bicep template

I have a question related to Configuring Azure function authentication using Arm or Bicep template. When I use the portal to configure authentication for Azure function, a MICROSOFT_PROVIDER_AUTHENTICATION_SECRET gets created automatically in the…
2
votes
1 answer

Azure App Service Bicep template with deployment slot

Here is my bicep template to deploy App service. Need help to add a slot with name: 'staging' (settings to be cloned from parent) resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = { name: appServicePlanName location: location …
Krish
  • 51
  • 6
2
votes
1 answer

Bicep - How to update a dictionary object

How to use bicep to update a dictionary object, like: original dict object: var dict = { 'a': {} } I have a array now: ['b', 'c'] and I want to update dict object like: { 'a': {} 'b': {} 'c': {} } Could I implement this with bicep?
jenny
  • 41
  • 1
  • 5
2
votes
1 answer

Create Azure ADF SHIR using bicep

I am trying to create DataFactory SelfHosted Runtime using bicep I am trying to follow https://learn.microsoft.com/en-us/azure/templates/microsoft.datafactory/2018-06-01/factories/integrationruntimes?pivots=deployment-language-bicep There is…
JemHah
  • 434
  • 4
  • 16
2
votes
1 answer

Secret scoped role definition and assignment using bicep

I am trying to create two reusable bicep modules to allow reading specific secrets in chosen key vaults. To do this, I first declare the role definition: targetScope = 'subscription' param subscriptionId string param resourceGroupName string param…
jokarl
  • 1,913
  • 2
  • 24
  • 52