Skip to content

Commit c7a68b4

Browse files
authored
Merge pull request #269690 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents 1570903 + 9812bfd commit c7a68b4

File tree

3 files changed

+45
-28
lines changed

3 files changed

+45
-28
lines changed

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

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: CI/CD with Azure Pipelines and Bicep files
3-
description: In this quickstart, you learn how to configure continuous integration in Azure Pipelines by using Bicep files. It shows how to use an Azure CLI task to deploy a Bicep file.
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.
44
ms.topic: quickstart
55
ms.custom: devx-track-bicep, devx-track-azurecli
6-
ms.date: 06/21/2023
6+
ms.date: 02/29/2024
77
---
88

99
# Quickstart: Integrate Bicep with Azure Pipelines
@@ -22,6 +22,8 @@ You need to have configured a [service connection](/azure/devops/pipelines/libra
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.
26+
2527
## Create pipeline
2628

2729
1. From your Azure DevOps organization, select **Pipelines** and **Create pipeline**.
@@ -47,88 +49,101 @@ You can use Azure Resource Group Deployment task or Azure CLI task to deploy a B
4749
### Use Azure Resource Manager Template Deployment task
4850

4951
> [!NOTE]
50-
> *AzureResourceManagerTemplateDeployment@3* task won't work if you have a *bicepparam* file.
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.
53+
54+
> [!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.
5156
52-
1. Replace your starter pipeline with the following YAML. It creates a resource group and deploys a Bicep file by using an [Azure Resource Manager Template Deployment task](/azure/devops/pipelines/tasks/reference/azure-resource-manager-template-deployment-v3).
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.
5358

5459
```yml
5560
trigger:
5661
- main
5762

5863
name: Deploy Bicep files
5964

65+
parameters:
66+
azureServiceConnection: '<your-connection-name>'
67+
6068
variables:
6169
vmImageName: 'ubuntu-latest'
62-
63-
azureServiceConnection: '<your-connection-name>'
6470
resourceGroupName: 'exampleRG'
6571
location: '<your-resource-group-location>'
6672
templateFile: './main.bicep'
73+
csmParametersFile: './main.bicepparam'
74+
6775
pool:
6876
vmImage: $(vmImageName)
6977

7078
steps:
7179
- task: AzureResourceManagerTemplateDeployment@3
7280
inputs:
7381
deploymentScope: 'Resource Group'
74-
azureResourceManagerConnection: '$(azureServiceConnection)'
82+
azureSubscription: '${{ parameters.azureServiceConnection }}'
7583
action: 'Create Or Update Resource Group'
7684
resourceGroupName: '$(resourceGroupName)'
7785
location: '$(location)'
7886
templateLocation: 'Linked artifact'
7987
csmFile: '$(templateFile)'
88+
csmParametersFile: '$(csmParametersFile)'
8089
overrideParameters: '-storageAccountType Standard_LRS'
8190
deploymentMode: 'Incremental'
8291
deploymentName: 'DeployPipelineTemplate'
8392
```
8493
8594
1. Update the values of `azureServiceConnection` and `location`.
86-
1. Verify you have a `main.bicep` in your repo, and the content of the Bicep file.
95+
1. Verify you have a valid `main.bicep` file in your repo.
96+
1. Verify you have a valid `main.bicepparam` file in your repo that contains a [using](/azure/azure-resource-manager/bicep/bicep-using) statement.
8797
1. Select **Save**. The build pipeline automatically runs. Go back to the summary for your build pipeline, and watch the status.
8898

8999
### Use Azure CLI task
90100

91-
1. Replace your starter pipeline with the following YAML. It creates a resource group and deploys a Bicep file by using an [Azure CLI task](/azure/devops/pipelines/tasks/reference/azure-cli-v2):
101+
> [!NOTE]
102+
> 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.
103+
104+
> [!NOTE]
105+
> 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.
106+
107+
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):
92108

93109
```yml
94110
trigger:
95111
- main
96112
97113
name: Deploy Bicep files
98114
115+
parameters:
116+
azureServiceConnection: '<your-connection-name>'
117+
99118
variables:
100119
vmImageName: 'ubuntu-latest'
101-
102-
azureServiceConnection: '<your-connection-name>'
103120
resourceGroupName: 'exampleRG'
104121
location: '<your-resource-group-location>'
105-
templateFile: 'main.bicep'
122+
bicepParamFile: './main.bicepparam'
123+
106124
pool:
107125
vmImage: $(vmImageName)
108126
109127
steps:
110128
- task: AzureCLI@2
111129
inputs:
112-
azureSubscription: $(azureServiceConnection)
130+
azureSubscription: '${{ parameters.azureServiceConnection }}'
113131
scriptType: bash
114132
scriptLocation: inlineScript
115133
useGlobalConfig: false
116134
inlineScript: |
117135
az --version
118136
az group create --name $(resourceGroupName) --location $(location)
119-
az deployment group create --resource-group $(resourceGroupName) --template-file $(templateFile)
120-
```
121-
122-
To override the parameters, update the last line of `inlineScript` to:
123-
124-
```bicep
125-
az deployment group create --resource-group $(resourceGroupName) --template-file $(templateFile) --parameters storageAccountType='Standard_GRS' location='eastus'
137+
az deployment group create `
138+
--resource-group $(resourceGroupName) `
139+
--parameters $(bicepParamFile) `
140+
--name DeployPipelineTemplate
126141
```
127142

128143
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`.
129144

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

134149
## Clean up resources

articles/container-apps/tutorial-dev-services-kafka.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ Azure CLI commands and Bicep template fragments are featured in this tutorial. I
394394
```
395395

396396
> [!TIP]
397-
> The output `kafkaLogs` outputs a CLI command to help you view the logs of postgres after deployment is complete. You can run the command to view the initialization logs of the new Postgres service.
397+
> The output `kafkaLogs` outputs a CLI command to help you view the logs of kafka after deployment is complete. You can run the command to view the initialization logs of the new Kafka service.
398398

399399
# [azd](#tab/azd)
400400

@@ -457,7 +457,7 @@ Azure CLI commands and Bicep template fragments are featured in this tutorial. I
457457
458458
When you create the app, you'll set it up to use `./kafka-topics.sh`, `./kafka-console-producer.sh`, and `kafka-console-consumer.sh` to connect to the Kafka instance.
459459

460-
1. Create a `kafka-cli-app` app that binds to the PostgreSQL service.
460+
1. Create a `kafka-cli-app` app that binds to the Kafka service.
461461

462462
# [Bash](#tab/bash)
463463

@@ -475,7 +475,7 @@ When you create the app, you'll set it up to use `./kafka-topics.sh`, `./kafka-c
475475

476476
# [Bicep](#tab/bicep)
477477

478-
Add the following to values `postgres-dev.bicep`.
478+
Add the following to values `kafka-dev.bicep`.
479479

480480
```bicep
481481
resource kafkaCli 'Microsoft.App/containerApps@2023-04-01-preview' = {
@@ -837,7 +837,7 @@ azd up
837837
838838
---
839839
840-
:::image type="content" source="media/tutorial-dev-services-kafka/azure-container-apps-kafka-ui-data.png" alt-text="Screenshot of pgweb Container App connecting to PostgreSQL service.":::
840+
:::image type="content" source="media/tutorial-dev-services-kafka/azure-container-apps-kafka-ui-data.png" alt-text="Screenshot of pgweb Container App connecting to Kafka service.":::
841841
842842
## Deploy all resources
843843
@@ -847,7 +847,7 @@ Use the following examples to if you want to deploy all resources at once.
847847
848848
The following Bicep template contains all the resources in this tutorial.
849849
850-
You can create a `postgres-dev.bicep` file with this content.
850+
You can create a `kafka-dev.bicep` file with this content.
851851
852852
```bicep
853853
targetScope = 'resourceGroup'

articles/storage-actions/storage-tasks/storage-task-quickstart-portal.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ In this quickstart, you learn how to use the [Azure portal](https://portal.azure
2424
- An Azure subscription. See [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2525

2626
- An Azure storage account. See [create a storage account](../../storage/common/storage-account-create.md). As you create the account, make sure to enable version-level immutability support and that you don't enable the hierarchical namespace feature.
27+
28+
During the public preview, you can target only storage accounts that are in the same region as the storage tasks.
2729

2830
- The [Storage Blob Data Owner](../../role-based-access-control/built-in-roles.md#storage-blob-data-owner) role is assigned to your user identity in the context of the storage account or resource group.
2931

@@ -167,4 +169,4 @@ After the task completes running, you can view the results of the run.
167169

168170
## Next steps
169171

170-
[Create a storage task](storage-task-create.md)
172+
[Create a storage task](storage-task-create.md)

0 commit comments

Comments
 (0)