Skip to content

Commit 76e19f3

Browse files
committed
minor edit
1 parent 59853ad commit 76e19f3

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

articles/azure-resource-manager/bicep/deploy-github-actions.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ ms.custom: github-actions-azure, devx-track-bicep
88

99
# Quickstart: Deploy Bicep files by using GitHub Actions
1010

11-
[GitHub Actions](https://docs.github.com/en/actions) is a suite of features in GitHub to automate your software development workflows.
12-
13-
In this quickstart, you use the [GitHub Actions for Azure Resource Manager deployment](https://github.com/marketplace/actions/deploy-azure-resource-manager-arm-template) to automate deploying a Bicep file to Azure.
11+
[GitHub Actions](https://docs.github.com/en/actions) is a suite of features in GitHub to automate your software development workflows. In this quickstart, you use the [GitHub Actions for Azure Resource Manager deployment](https://github.com/marketplace/actions/deploy-azure-resource-manager-arm-template) to automate deploying a Bicep file to Azure.
1412

1513
It provides a short introduction to GitHub actions and Bicep files. If you want more detailed steps on setting up the GitHub actions and project, see [Deploy Azure resources by using Bicep and GitHub Actions](/training/paths/bicep-github-actions).
1614

@@ -42,35 +40,30 @@ New-AzResourceGroup -Name exampleRG -Location westus
4240

4341
# [Service principal](#tab/userlevel)
4442

45-
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.
46-
47-
Replace the placeholder `{app-name}` with the name of your application. Replace `{subscription-id}` with your subscription ID.
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 is recommended that you grant minimum required access.
4844

4945
```azurecli-interactive
5046
az ad sp create-for-rbac --name {app-name} --role contributor --scopes /subscriptions/{subscription-id}/resourceGroups/exampleRG --json-auth
5147
```
5248

53-
> [!IMPORTANT]
54-
> The scope in the previous example is limited to the resource group. We recommend that you grant minimum required access.
49+
Replace the placeholder `{app-name}` with the name of your application. Replace `{subscription-id}` with your subscription ID.
5550

56-
The output is a JSON object with the role assignment credentials that provide access to your App Service app similar to below. Copy this JSON object for later. You'll only need the sections with the `clientId`, `clientSecret`, `subscriptionId`, and `tenantId` values.
51+
The output is a JSON object with the role assignment credentials that provide access to your App Service app similar to below.
5752

5853
```output
5954
{
6055
"clientId": "<GUID>",
6156
"clientSecret": "<GUID>",
6257
"subscriptionId": "<GUID>",
6358
"tenantId": "<GUID>",
64-
(...)
59+
...
6560
}
6661
```
6762

68-
> [!NOTE]
69-
> Remove the comma at the end of the last line, 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 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."
7064

7165
# [Open ID Connect](#tab/openid)
7266

73-
7467
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.
7568

7669
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.
@@ -119,7 +112,7 @@ Open ID Connect is an authentication method that uses short-lived tokens. Settin
119112
120113
# [Service principal](#tab/userlevel)
121114
122-
Create secrets for your Azure credentials, resource group, and subscriptions.
115+
Create secrets for your Azure credentials, resource group, and subscriptions. You will use these secrets in the [Create workflow](#create-workflow) section.
123116
124117
1. In [GitHub](https://github.com/), navigate to your repository.
125118

0 commit comments

Comments
 (0)