Skip to content

Commit 7faa940

Browse files
Merge pull request #296344 from LiSeda/LS-batch9
LS_Bicep_batch 9
2 parents 5b87897 + 2cd5662 commit 7faa940

File tree

5 files changed

+63
-63
lines changed

5 files changed

+63
-63
lines changed

articles/azure-resource-manager/bicep/add-template-to-azure-pipelines.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
---
2-
title: CI/CD with Azure Pipelines, Bicep, and bicepparam files
3-
description: In this quickstart, you learn how to configure continuous integration in Azure Pipelines by using Bicep and bicepparam files. It shows how to use an Azure CLI task to deploy a bicepparam file.
2+
title: 'Quickstart: Integrate Bicep with Azure Pipelines'
3+
description: This quickstart explains how to use Bicep and `.bicepparam` files to configure continuous integration and continuous deployments in Azure Pipelines, plus how to use an Azure CLI task to deploy a `.bicepparam` file.
44
ms.topic: quickstart
55
ms.custom: devx-track-bicep, devx-track-azurecli
6-
ms.date: 09/26/2024
6+
ms.date: 03/25/2025
77
---
88

99
# Quickstart: Integrate Bicep with Azure Pipelines
1010

11-
This quickstart shows you how to integrate Bicep files with Azure Pipelines for continuous integration and continuous deployment (CI/CD).
11+
This quickstart shows you how to integrate Bicep files with Azure Pipelines for continuous integration and continuous deployment.
1212

13-
It provides a short introduction to the pipeline task you need for deploying a Bicep file. If you want more detailed steps on setting up the pipeline and project, see [Deploy Azure resources by using Bicep and Azure Pipelines](/training/paths/bicep-azure-pipelines/).
13+
It provides a short introduction to the pipeline task you need for deploying a Bicep file. For more detailed steps on setting up the pipeline and project, see the [Deploy Azure resources by using Bicep and Azure Pipelines](/training/paths/bicep-azure-pipelines/) Microsoft Learn module.
1414

1515
## Prerequisites
1616

1717
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
1818

19-
You need an Azure DevOps organization. If you don't have one, [create one for free](/azure/devops/pipelines/get-started/pipelines-sign-up). If your team already has an Azure DevOps organization, make sure you're an administrator of the Azure DevOps project that you want to use.
19+
You also need an Azure DevOps organization. If you don't have one, [create one for free](/azure/devops/pipelines/get-started/pipelines-sign-up). If your team already has an Azure DevOps organization, make sure you're an administrator of the Azure DevOps project that you want to use.
2020

2121
You need to have configured a [service connection](/azure/devops/pipelines/library/connect-to-azure) to your Azure subscription. The tasks in the pipeline execute under the identity of the service principal. For steps to create the connection, see [Create a DevOps project](../templates/deployment-tutorial-pipeline.md#create-a-devops-project).
2222

2323
You need a [Bicep file](./quickstart-create-bicep-use-visual-studio-code.md) that defines the infrastructure for your project. This file is in a repository.
2424

25-
You need a [bicepparam file](/azure/azure-resource-manager/bicep/parameter-files) that defines the parameters used by your bicep file. This file is in a repository.
25+
You need a ['.bicepparam' file](/azure/azure-resource-manager/bicep/parameter-files) that defines the parameters that your Bicep file uses. This file is in a repository.
2626

2727
## Create pipeline
2828

2929
1. From your Azure DevOps organization, select **Pipelines** and **Create pipeline**.
3030

3131
:::image type="content" source="./media/add-template-to-azure-pipelines/new-pipeline.png" alt-text="Screenshot of creating new pipeline.":::
3232

33-
1. Specify where your code is stored. This quickstart uses Azure Repos Git.
33+
1. Specify where your code is stored. This quickstart uses Azure Repos Git repos.
3434

3535
:::image type="content" source="./media/add-template-to-azure-pipelines/select-source.png" alt-text="Screenshot of selecting code source.":::
3636

@@ -44,17 +44,17 @@ You need a [bicepparam file](/azure/azure-resource-manager/bicep/parameter-files
4444

4545
## Deploy Bicep files
4646

47-
You can use Azure Resource Group Deployment task or Azure CLI task to deploy a Bicep file.
47+
You can use an Azure Resource Group deployment task or an Azure CLI task to deploy a Bicep file.
4848

49-
### Use Azure Resource Manager Template Deployment task
49+
### Use Azure Resource Manager template deployment task
5050

5151
> [!NOTE]
52-
> As of version 3.235.0 of the [Azure Resource Manager Template Deployment task](/azure/devops/pipelines/tasks/reference/azure-resource-manager-template-deployment-v3), usage of [bicepparam](/azure/azure-resource-manager/bicep/parameter-files) files is supported.
52+
> As of [Azure Resource Manager template deployment task](/azure/devops/pipelines/tasks/reference/azure-resource-manager-template-deployment-v3) version 3.235.0, usage of ['.bicepparam'](/azure/azure-resource-manager/bicep/parameter-files) files is supported.
5353
5454
> [!NOTE]
55-
> The `AzureResourceManagerTemplateDeployment@3` task requires both Bicep and bicepparam files be provided when using bicepparam. The Bicep file can reference all supported locations for module references. The bicepparam file must reference the local Bicep file in the `using` statement.
55+
> The `AzureResourceManagerTemplateDeployment@3` task requires both Bicep and `.bicepparam` files to be provided when using `.bicepparam`. The Bicep file can reference all supported locations for module references. The `.bicepparam` file must reference the local Bicep file in the `using` statement.
5656
57-
1. Replace your starter pipeline with the following YAML. It creates a resource group and deploys a Bicep and bicepparam file by using the Azure Resource Manager Template Deployment task.
57+
1. Replace your starter pipeline with the following YAML. It uses the Azure Resource Manager template deployment task to create a resource group and deploy a Bicep and `.bicepparam` file.
5858

5959
```yml
6060
trigger:
@@ -95,18 +95,18 @@ You can use Azure Resource Group Deployment task or Azure CLI task to deploy a B
9595
9696
1. Update the values of `azureServiceConnection` and `location`.
9797
1. Verify you have a valid `main.bicep` file in your repo.
98-
1. Verify you have a valid `main.bicepparam` file in your repo that contains a [using](/azure/azure-resource-manager/bicep/bicep-using) statement.
99-
1. Select **Save**. The build pipeline automatically runs. Go back to the summary for your build pipeline, and watch the status.
98+
1. Verify you have a valid `main.bicepparam` file in your repo that contains a [`using`](/azure/azure-resource-manager/bicep/bicep-using) statement.
99+
1. Select **Save**. The build pipeline runs automatically. Go back to the summary for your build pipeline, and watch the status.
100100

101101
### Use Azure CLI task
102102

103103
> [!NOTE]
104-
> The [az deployment group create](/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-create&preserve-view=true) command requires only a bicepparam file. The `using` statement in the bicepparam file can target any supported location to reference the Bicep file. A Bicep file is only required in your repository when `using` from a local disk path with Azure CLI.
104+
> The [`az deployment group create`](/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-create&preserve-view=true) command requires only a `bicepparam.` file. The `using` statement in the `.bicepparam` file can target any supported location to reference the Bicep file. A Bicep file is only required in your repository when `using` from a local disk path with the Azure CLI.
105105

106106
> [!NOTE]
107-
> When you use a *[bicepparam](/azure/azure-resource-manager/bicep/parameter-files)* file with the [az deployment group create](/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-create&preserve-view=true) command, you can't override parameters.
107+
> When you use a [`.bicepparam`](/azure/azure-resource-manager/bicep/parameter-files) file with the [`az deployment group create`](/cli/azure/deployment/group?view=azure-cli-latest#az-deployment-group-create&preserve-view=true) command, you can't override parameters.
108108

109-
1. Replace your starter pipeline with the following YAML. It creates a resource group and deploys a [bicepparam](/azure/azure-resource-manager/bicep/parameter-files) file by using an [Azure CLI task](/azure/devops/pipelines/tasks/reference/azure-cli-v2):
109+
1. Replace your starter pipeline with the following YAML. It creates a resource group and deploys a [`.bicepparam`](/azure/azure-resource-manager/bicep/parameter-files) file by using an [Azure CLI task](/azure/devops/pipelines/tasks/reference/azure-cli-v2):
110110

111111
```yml
112112
trigger:
@@ -142,23 +142,23 @@ You can use Azure Resource Group Deployment task or Azure CLI task to deploy a B
142142
--name DeployPipelineTemplate
143143
```
144144

145-
For the descriptions of the task inputs, see [Azure CLI task](/azure/devops/pipelines/tasks/reference/azure-cli-v2). When using the task on air-gapped cloud, you must set the `useGlobalConfig` property of the task to `true`. The default value is `false`.
145+
For the descriptions of the task inputs, see [Azure CLI v2 task](/azure/devops/pipelines/tasks/reference/azure-cli-v2). When using the task on air-gapped cloud, you must set the `useGlobalConfig` property of the task to `true`. The default value is `false`.
146146

147147
1. Update the values of `azureServiceConnection` and `location`.
148-
1. Verify you have a valid `main.bicepparam` file in your repo that contains a [using](/azure/azure-resource-manager/bicep/bicep-using) statement.
149-
1. Select **Save**. The build pipeline automatically runs. Go back to the summary for your build pipeline, and watch the status.
148+
1. Verify you have a valid `main.bicepparam` file in your repo that contains a [`using`](/azure/azure-resource-manager/bicep/bicep-using) statement.
149+
1. Select **Save**. The build pipeline runs automatically. Go back to the summary for your build pipeline, and watch the status.
150150

151151
## Clean up resources
152152

153153
When the Azure resources are no longer needed, use the Azure CLI or Azure PowerShell to delete the quickstart resource group.
154154

155-
# [CLI](#tab/CLI)
155+
# [Azure CLI](#tab/azure-cli)
156156

157157
```azurecli
158158
az group delete --name exampleRG
159159
```
160160

161-
# [PowerShell](#tab/PowerShell)
161+
# [Azure PowerShell](#tab/azure-powershell)
162162

163163
```azurepowershell
164164
Remove-AzResourceGroup -Name exampleRG

articles/azure-resource-manager/bicep/decompile.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Decompile a JSON Azure Resource Manager template to Bicep
33
description: Learn the commands for decompiling JSON Azure Resource Manager templates to Bicep files.
44
ms.topic: how-to
5-
ms.date: 02/14/2025
65
ms.custom: devx-track-bicep, devx-track-arm-template
6+
ms.date: 03/25/2025
77
---
88

99
# Decompile a JSON Azure Resource Manager template to Bicep
@@ -32,9 +32,9 @@ This command creates a file named _main.bicep_ in the same directory as _main.js
3232
You can also decompile ARM template JSON to Bicep from Visual Studio Code by using the `Decompile into Bicep` command in Visual Studio Code. For more information, see [Decompile into Bicep](./visual-studio-code.md#decompile-into-bicep-command).
3333

3434
> [!CAUTION]
35-
> Decompilation attempts to convert the file, but there is no guaranteed mapping from JSON ARM templates to Bicep. You might need to fix warnings and errors in the generated Bicep file. Or, decompilation can fail if an accurate conversion isn't possible. [Create an issue](https://github.com/Azure/bicep/issues) to report any issues or inaccurate conversions.
35+
> Decompilation attempts to convert the file, but there is no guaranteed mapping from JSON ARM templates to Bicep. You might need to fix warnings and errors in the generated Bicep file. Otherwise, decompilation can fail if an accurate conversion isn't possible. [Create an issue](https://github.com/Azure/bicep/issues) to report any issues or inaccurate conversions.
3636
37-
The decompile and [build](bicep-cli.md#build) commands produce templates that are functionally equivalent. However, they might not be exactly the same during implementation. Converting a template from JSON to Bicep and then back to JSON might produce a template with different syntax than the original template. When deployed, the converted templates produce the same results.
37+
The decompile and [build](bicep-cli.md#build) commands produce templates that are functionally equivalent. However, they might not be exactly the same during implementation. Converting a template from JSON to Bicep and then back to JSON can produce a template with different syntax than the original template. When deployed, the converted templates produce the same results.
3838

3939
## Fix conversion issues
4040

@@ -168,7 +168,7 @@ output storageAccountName string = uniqueStorageName
168168
## Export template and convert
169169

170170
> [!NOTE]
171-
> You can export Bicep files by using the Azure portal. For more information, see [Use Azure portal to export a Bicep file](./export-bicep-portal.md).
171+
> You can use the Azure portal to export Bicep files. For more information, see [Use Azure portal to export a Bicep file](./export-bicep-portal.md).
172172
173173
You can export the template for a resource group and then pass it directly to the `decompile` command. The following examples show how to decompile an exported template:
174174

articles/azure-resource-manager/bicep/existing-resource.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: Reference existing resource in Bicep
3-
description: Describes how to reference a resource that already exists.
3+
description: Learn how to reference resources that exist.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 07/11/2024
6+
ms.date: 03/25/2025
77
---
88

9-
# Existing resources in Bicep
9+
# Reference existing resources in Bicep
1010

1111
To reference an existing resource that isn't deployed in your current Bicep file, declare the resource with the `existing` keyword. Use the `existing` keyword when you're deploying a resource that needs to get a value from an existing resource. You access the existing resource's properties through its symbolic name.
1212

13-
The resource isn't redeployed when referenced with the `existing` keyword.
13+
The resource doesn't deploy again when the `existing` keyword references it.
1414

1515
## Same scope
1616

@@ -26,7 +26,7 @@ output blobEndpoint string = stg.properties.primaryEndpoints.blob
2626

2727
## Different scope
2828

29-
Set the `scope` property to access a resource in a different scope. The following example references an existing storage account in a different resource group.
29+
Set the `scope` property to access a resource in a different scope. The following example references an existing storage account in a different resource group:
3030

3131
```bicep
3232
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {

0 commit comments

Comments
 (0)