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

Bicep module outputs wrong resource id

I have subscription scoped bicep deployment, including some modules to create content for resource group. In one module I create VNET and I try to get back its resource ID output vnetId string = vnet.id, on another module I'd like to use this value…
Zveratko
  • 2,663
  • 6
  • 35
  • 64
0
votes
2 answers

Azure Bicep in DevOps release pipeline

I have an existing Azure DevOps release pipeline that deploys resources using Azure CLI to multiple environments DEV, TEST, PROD. I'd like to switch gradually to using Bicep files. Microsoft's Quickstart: Integrate Bicep with Azure Pipelines shows…
tymtam
  • 31,798
  • 8
  • 86
  • 126
0
votes
2 answers

Add variables and parameters to a bicep deploymentTemplate.json file

Looking at the documentation from a deploymentTemplate.json schema file from an arm template we can use variables ([variables('uniqueStorageName')]) and parameters ([parameters('resourceTags')]) inside it so that the template is generic and we can…
Nmaster88
  • 1,405
  • 2
  • 23
  • 65
0
votes
1 answer

How to activate compression for Azure Front Door routes using Bicep?

I am using Azure Front Door Standard/Premium and have already manually enabled compression for my UI routes via Azure Portal. I wanted to map this configuration as IaC with Bicep. However, there was no proper documentation on how to do this. My…
0
votes
1 answer

Azure bicep use key vault from different resource group

I've an Azure Key Vault(KV) that has shared secrets and a cert that needs to be pulled into different deployments. E.g. DEV, TEST, UAT, Production all have their own key vaults BUT need access to the shared KV for wild card ssl cert. I've tried a…
user3067684
  • 936
  • 9
  • 18
0
votes
1 answer

Applying Azure Metric Alerts to multiple Event Grid Topics

I'm attempting to monitor dead-lettered events among multiple Event Grid Topics within an ecosystem, but can't seem to find a query within Azure Monitor that would output these types of events for alert rule creation at scale - I'm thinking my only…
0
votes
1 answer

Dynamically adding SQL Logins to DSC for Azure Automation Credentials

I have a SQL Server on a VM being setup using a DSC file. I have been able to use SQL Login in the past (https://github.com/dsccommunity/SqlServerDsc/wiki/SqlLogin) but that only allows me to use it one at a time. I am trying to take all logins…
0
votes
1 answer

Azure key vault values inside AKS

I've been building Azure Bicep files with the goal of having our infrastructure codified. All is going well except for AKS. Reading and experimenting I think I have two options. AKS has pods with Nodejs or .net services running in them which need…
0
votes
1 answer

How to show the path of the script of the Azure runbook in Bicep?

I am want to deploy an Azure Automation Account runbook with Bicep with below code: resource automationAccount 'Microsoft.Automation/automationAccounts@2019-06-01' = { name: 'name' } resource automationRunbook…
MoonHorse
  • 1,966
  • 2
  • 24
  • 46
0
votes
1 answer

In Azure Bicep, how do I define a child resource each for multiple existing parent resources?

This is my actual use case: I'm writing a Bicep file that adds a subnet to an existing VNET and that should then add corresponding VNET rules to a list of Azure SQL Servers. The SQL Servers should be defined by a configuration parameter. For those…
Fabian Schmied
  • 3,885
  • 3
  • 30
  • 49
0
votes
1 answer

Deployment of ARM template to Devops branch

As a part of learning bicep, I've created an arm template for linked service to an existing ADF. When I deploy the template from ADF, It is being deployed directly in live mode. Would it be possible to deploy that template and have those newly…
0
votes
1 answer

How to assign RBAC to KeyVault in another resourceGroup

I am deploying a couple of web apps - as the web apps build I need to be able to assign the system identity of each web app to an RABC role for a KeyVault in another resource group that has my certificates. The idea is that once the web apps are…
JacksWastedLife
  • 254
  • 2
  • 15
0
votes
1 answer

Azure aks agic identity refresh credentials

I am deploying an aks cluster with agic (application gateway ingress controller) with bicep In the aks.bicep I declare this resource aksCluster 'Microsoft.ContainerService/managedClusters@2021-03-01' = { name: 'aks-core-${env}' location:…
0
votes
2 answers

Using BICEP can I find a specific element in an array by a substring of the name?

I have a bicep module storageAccounts.bicep, which is creating multiple storage accounts and outputing an array of their names: @description('Name of Environment') param environment string param storageAccounts array = [ { name :…
John McArthur
  • 916
  • 1
  • 12
  • 30
0
votes
1 answer

roleassignment to azure resourcegroup in Bicep

I'm trying to create a resourcegroup and assign contributor permissions to it usinng one bicep template. This fails with the error message "A nested resource type must have identical number of segments as its resource name" my bicep…