You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/add-template-to-azure-pipelines.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: CI/CD with Azure Pipelines, Bicep, and bicepparam files
3
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.
4
4
ms.topic: quickstart
5
5
ms.custom: devx-track-bicep, devx-track-azurecli
6
-
ms.date: 02/29/2024
6
+
ms.date: 09/26/2024
7
7
---
8
8
9
9
# Quickstart: Integrate Bicep with Azure Pipelines
Your GitHub Actions run under an identity. Use the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command to create a [service principal](../../active-directory/develop/app-objects-and-service-principals.md#service-principal-object) for the identity. Grant the service principal the contributor role for the resource group created in the previous session so that the GitHub action with the identity can create resources in this resource group. It is recommended that you grant minimum required access.
43
+
Your GitHub Actions run under an identity. Use the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command to create a [service principal](../../active-directory/develop/app-objects-and-service-principals.md#service-principal-object) for the identity. Grant the service principal the contributor role for the resource group created in the previous session so that the GitHub action with the identity can create resources in this resource group. It's recommended that you grant minimum required access.
44
44
45
45
```azurecli-interactive
46
46
az ad sp create-for-rbac --name {app-name} --role contributor --scopes /subscriptions/{subscription-id}/resourceGroups/exampleRG --json-auth
47
47
```
48
48
49
49
Replace the placeholder `{app-name}` with the name of your application. Replace `{subscription-id}` with your subscription ID.
50
50
51
-
The output is a JSON object with the role assignment credentials that provide access to your App Service app similar to below.
51
+
The output is a JSON object with the role assignment credentials that provide access to your App Service app similar to the following output.
52
52
53
53
```output
54
54
{
@@ -60,21 +60,21 @@ The output is a JSON object with the role assignment credentials that provide ac
60
60
}
61
61
```
62
62
63
-
Copy this JSON object for later. You'll only need the sections with the `clientId`, `clientSecret`, `subscriptionId`, and `tenantId` values. Make sure you don't have an extra comma at the end of the last line, for example, the `tenantId` line in the preceding example, or else it will result in an invalid JSON file. You will get an error during the deployment saying "Login failed with Error: Content is not a valid JSON object. Double check if the 'auth-type' is correct."
63
+
Copy this JSON object for later. You'll only need the sections with the `clientId`, `clientSecret`, `subscriptionId`, and `tenantId` values. Make sure you don't have an extra comma at the end of the last line, for example, the `tenantId` line in the preceding example, or else it results in an invalid JSON file. You get an error during the deployment saying "Login failed with Error: Content isn't a valid JSON object. Double check if the 'auth-type' is correct."
64
64
65
65
# [Open ID Connect](#tab/openid)
66
66
67
67
Open ID Connect is an authentication method that uses short-lived tokens. Setting up [OpenID Connect with GitHub Actions](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) is more complex process that offers hardened security.
68
68
69
-
1. If you do not have an existing application, register a [new Active Directory application and service principal that can access resources](../../active-directory/develop/howto-create-service-principal-portal.md). Create the Active Directory application.
69
+
1. If you don't have an existing application, register a [new Active Directory application and service principal that can access resources](../../active-directory/develop/howto-create-service-principal-portal.md). Create the Active Directory application.
70
70
71
71
```azurecli-interactive
72
72
az ad app create --display-name myApp
73
73
```
74
74
75
-
This command will output JSON with an `appId` that is your `client-id`. Save the value to use as the `AZURE_CLIENT_ID` GitHub secret later.
75
+
This command outputs JSON with an `appId` that is your `client-id`. Save the value to use as the `AZURE_CLIENT_ID` GitHub secret later.
76
76
77
-
You'll use the `objectId` value when creating federated credentials with Graph API and reference it as the `APPLICATION-OBJECT-ID`.
77
+
You use the `objectId` value when creating federated credentials with Graph API and reference it as the `APPLICATION-OBJECT-ID`.
78
78
79
79
1. Create a service principal. Replace the `$appID` with the appId from your JSON output.
80
80
@@ -86,7 +86,7 @@ Open ID Connect is an authentication method that uses short-lived tokens. Settin
86
86
az ad sp create --id $appId
87
87
```
88
88
89
-
1. Create a new role assignment by subscription and object. By default, the role assignment will be tied to your default subscription. Replace `$subscriptionId` with your subscription ID, `$resourceGroupName` with your resource group name, and `$assigneeObjectId` with the generated `assignee-object-id`. Learn [how to manage Azure subscriptions with the Azure CLI](/cli/azure/manage-azure-subscriptions-azure-cli).
89
+
1. Create a new role assignment by subscription and object. By default, the role assignment is tied to your default subscription. Replace `$subscriptionId` with your subscription ID, `$resourceGroupName` with your resource group name, and `$assigneeObjectId` with the generated `assignee-object-id`. Learn [how to manage Azure subscriptions with the Azure CLI](/cli/azure/manage-azure-subscriptions-azure-cli).
90
90
91
91
```azurecli-interactive
92
92
az role assignment create --role contributor --subscription $subscriptionId --assignee-object-id $assigneeObjectId --assignee-principal-type ServicePrincipal --scopes /subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Web/sites/
@@ -112,7 +112,7 @@ Open ID Connect is an authentication method that uses short-lived tokens. Settin
112
112
113
113
# [Service principal](#tab/userlevel)
114
114
115
-
Create secrets for your Azure credentials, resource group, and subscriptions. You will use these secrets in the [Create workflow](#create-workflow) section.
115
+
Create secrets for your Azure credentials, resource group, and subscriptions. You use these secrets in the [Create workflow](#create-workflow) section.
116
116
117
117
1. In [GitHub](https://github.com/), navigate to your repository.
118
118
@@ -284,7 +284,7 @@ Updating either the workflow file or Bicep file triggers the workflow. The workf
284
284
285
285
## Check workflow status
286
286
287
-
1. Select the **Actions** tab. You'll see a **Create deployBicepFile.yml** workflow listed. It takes 1-2 minutes to run the workflow.
287
+
1. Select the **Actions** tab. You see a **Create deployBicepFile.yml** workflow listed. It takes 1-2 minutes to run the workflow.
288
288
1. Select the workflow to open it, and verify the `Status` is `Success`.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/deploy-to-management-group.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use Bicep to deploy resources to management group
3
3
description: Describes how to create a Bicep file that deploys resources at the management group scope.
4
4
ms.topic: how-to
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 06/23/2023
6
+
ms.date: 09/26/2024
7
7
---
8
8
9
9
# Management group deployments with Bicep files
@@ -256,7 +256,7 @@ To deploy a template that moves an existing Azure subscription to a new manageme
256
256
257
257
Custom policy definitions that are deployed to the management group are extensions of the management group. To get the ID of a custom policy definition, use the [extensionResourceId()](./bicep-functions-resource.md#extensionresourceid) function. Built-in policy definitions are tenant level resources. To get the ID of a built-in policy definition, use the [tenantResourceId()](./bicep-functions-resource.md#tenantresourceid) function.
258
258
259
-
The following example shows how to [define](../../governance/policy/concepts/definition-structure.md) a policy at the management group level, and assign it.
259
+
The following example shows how to [define](../../governance/policy/concepts/definition-structure.md) a policy at the management group level, and how to assign it.
@@ -12,7 +12,7 @@ Before deploying a Bicep file, you can preview the changes that will happen. Azu
12
12
13
13
You can use the what-if operation with Azure PowerShell, Azure CLI, or REST API operations. What-if is supported for resource group, subscription, management group, and tenant level deployments.
14
14
15
-
During What-If operations, the evaluation and expansion of `templateLink`are not supported. As a result, any resources deployed using template links within nested deployments, including template spec references, will not be visible in the What-If operation results.
15
+
During What-If operations, the evaluation and expansion of `templateLink`aren't supported. As a result, any resources deployed using template links within nested deployments, including template spec references, won't be visible in the What-If operation results.
16
16
17
17
### Training resources
18
18
@@ -140,7 +140,7 @@ The what-if operation lists seven different types of changes:
140
140
141
141
-**Create**: The resource doesn't currently exist but is defined in the Bicep file. The resource will be created.
142
142
-**Delete**: This change type only applies when using [complete mode](../templates/deployment-modes.md) for JSON template deployment. The resource exists, but isn't defined in the Bicep file. With complete mode, the resource will be deleted. Only resources that [support complete mode deletion](../templates/deployment-complete-mode-deletion.md) are included in this change type.
143
-
-**Ignore**: The resource exists, but isn't defined in the Bicep file. The resource won't be deployed or modified. When you reach the limits for expanding nested templates, you will encounter this change type. See [What-if limits](#what-if-limits).
143
+
-**Ignore**: The resource exists, but isn't defined in the Bicep file. The resource won't be deployed or modified. When you reach the limits for expanding nested templates, you'll encounter this change type. See [What-if limits](#what-if-limits).
144
144
-**NoChange**: The resource exists, and is defined in the Bicep file. The resource will be redeployed, but the properties of the resource won't change. This change type is returned when [ResultFormat](#result-format) is set to `FullResourcePayloads`, which is the default value.
145
145
-**NoEffect**: The property is ready-only and will be ignored by the service. For example, the `sku.tier` property is always set to match `sku.name` in the [`Microsoft.ServiceBus`](/azure/templates/microsoft.servicebus/namespaces) namespace.
146
146
-**Modify**: The resource exists, and is defined in the Bicep file. The resource will be redeployed, and the properties of the resource will change. This change type is returned when [ResultFormat](#result-format) is set to `FullResourcePayloads`, which is the default value.
@@ -484,5 +484,5 @@ You can use the what-if operation through the Azure SDKs.
484
484
## Next steps
485
485
486
486
- To use the what-if operation in a pipeline, see [Test ARM templates with What-If in a pipeline](https://4bes.nl/2021/03/06/test-arm-templates-with-what-if/).
487
-
- If you notice incorrect results from the what-if operation, please report the issues at [https://aka.ms/whatifissues](https://aka.ms/whatifissues).
487
+
- If you notice incorrect results from the what-if operation, report the issues at [https://aka.ms/whatifissues](https://aka.ms/whatifissues).
488
488
- For a Learn module that demonstrates using what-if, see [Preview changes and validate Azure resources by using what-if and the ARM template test toolkit](/training/modules/arm-template-test/).
0 commit comments