Skip to content

Commit 81f376d

Browse files
authored
Fix invalid Azure CLI devlangs (#17768)
1 parent 1d18688 commit 81f376d

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

aspnetcore/azure/devops/deploying-to-app-service.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,33 +79,33 @@ To deploy the app, you'll need to create an App Service [Web App](/azure/app-ser
7979

8080
b. Create a resource group. Resource groups provide a means to aggregate Azure resources to be managed as a group.
8181

82-
```azure-cli
82+
```azurecli
8383
az group create --location centralus --name AzureTutorial
8484
```
8585

8686
The `az` command invokes the [Azure CLI](/cli/azure/). The CLI can be run locally, but using it in the Cloud Shell saves time and configuration.
8787

8888
c. Create an App Service plan in the S1 tier. An App Service plan is a grouping of web apps that share the same pricing tier. The S1 tier isn't free, but it's required for the staging slots feature.
8989

90-
```azure-cli
90+
```azurecli
9191
az appservice plan create --name $webappname --resource-group AzureTutorial --sku S1
9292
```
9393

9494
d. Create the web app resource using the App Service plan in the same resource group.
9595

96-
```azure-cli
96+
```azurecli
9797
az webapp create --name $webappname --resource-group AzureTutorial --plan $webappname
9898
```
9999

100100
e. Set the deployment credentials. These deployment credentials apply to all the web apps in your subscription. Don't use special characters in the user name.
101101

102-
```azure-cli
102+
```azurecli
103103
az webapp deployment user set --user-name REPLACE_WITH_USER_NAME --password REPLACE_WITH_PASSWORD
104104
```
105105

106106
f. Configure the web app to accept deployments from local Git and display the *Git deployment URL*. **Note this URL for reference later**.
107107

108-
```azure-cli
108+
```azurecli
109109
echo Git deployment URL: $(az webapp deployment source config-local-git --name $webappname --resource-group AzureTutorial --query url --output tsv)
110110
```
111111

@@ -164,13 +164,13 @@ Deployment slots support the staging of changes without impacting the app runnin
164164

165165
a. Create a deployment slot with the name *staging*.
166166

167-
```azure-cli
167+
```azurecli
168168
az webapp deployment slot create --name $webappname --resource-group AzureTutorial --slot staging
169169
```
170170

171171
b. Configure the staging slot to use deployment from local Git and get the **staging** deployment URL. **Note this URL for reference later**.
172172

173-
```azure-cli
173+
```azurecli
174174
echo Git deployment URL for staging: $(az webapp deployment source config-local-git --name $webappname --resource-group AzureTutorial --slot staging --query url --output tsv)
175175
```
176176

@@ -210,7 +210,7 @@ Deployment slots support the staging of changes without impacting the app runnin
210210

211211
7. In the Cloud Shell, swap the verified/warmed-up staging slot into production.
212212

213-
```azure-cli
213+
```azurecli
214214
az webapp deployment slot swap --name $webappname --resource-group AzureTutorial --slot staging
215215
```
216216

aspnetcore/security/key-vault-configuration.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
7979

8080
1. Create a resource group with the following command, where `{RESOURCE GROUP NAME}` is the resource group name for the new resource group and `{LOCATION}` is the Azure region (datacenter):
8181

82-
```azure-cli
82+
```azurecli
8383
az group create --name "{RESOURCE GROUP NAME}" --location {LOCATION}
8484
```
8585

8686
1. Create a key vault in the resource group with the following command, where `{KEY VAULT NAME}` is the name for the new key vault and `{LOCATION}` is the Azure region (datacenter):
8787

88-
```azure-cli
88+
```azurecli
8989
az keyvault create --name {KEY VAULT NAME} --resource-group "{RESOURCE GROUP NAME}" --location {LOCATION}
9090
```
9191

@@ -95,7 +95,7 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
9595

9696
The following secrets are for use with the sample app. The values include a `_prod` suffix to distinguish them from the `_dev` suffix values loaded in the Development environment from User Secrets. Replace `{KEY VAULT NAME}` with the name of the key vault that you created in the prior step:
9797

98-
```azure-cli
98+
```azurecli
9999
az keyvault secret set --vault-name {KEY VAULT NAME} --name "SecretName" --value "secret_value_1_prod"
100100
az keyvault secret set --vault-name {KEY VAULT NAME} --name "Section--SecretName" --value "secret_value_2_prod"
101101
```
@@ -165,7 +165,7 @@ An app deployed to Azure App Service is automatically registered with Azure AD w
165165

166166
Using Azure CLI and the app's Object ID, provide the app with `list` and `get` permissions to access the key vault:
167167

168-
```azure-cli
168+
```azurecli
169169
az keyvault set-policy --name {KEY VAULT NAME} --object-id {OBJECT ID} --secret-permissions get list
170170
```
171171

@@ -265,7 +265,7 @@ When this approach is implemented:
265265

266266
1. Secrets are saved in Azure Key Vault using the following Azure CLI commands:
267267

268-
```azure-cli
268+
```azurecli
269269
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5000-AppSecret" --value "5.0.0.0_secret_value_prod"
270270
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5100-AppSecret" --value "5.1.0.0_secret_value_prod"
271271
```
@@ -425,13 +425,13 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
425425

426426
1. Create a resource group with the following command, where `{RESOURCE GROUP NAME}` is the resource group name for the new resource group and `{LOCATION}` is the Azure region (datacenter):
427427

428-
```azure-cli
428+
```azurecli
429429
az group create --name "{RESOURCE GROUP NAME}" --location {LOCATION}
430430
```
431431

432432
1. Create a key vault in the resource group with the following command, where `{KEY VAULT NAME}` is the name for the new key vault and `{LOCATION}` is the Azure region (datacenter):
433433

434-
```azure-cli
434+
```azurecli
435435
az keyvault create --name {KEY VAULT NAME} --resource-group "{RESOURCE GROUP NAME}" --location {LOCATION}
436436
```
437437

@@ -441,7 +441,7 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
441441

442442
The following secrets are for use with the sample app. The values include a `_prod` suffix to distinguish them from the `_dev` suffix values loaded in the Development environment from User Secrets. Replace `{KEY VAULT NAME}` with the name of the key vault that you created in the prior step:
443443

444-
```azure-cli
444+
```azurecli
445445
az keyvault secret set --vault-name {KEY VAULT NAME} --name "SecretName" --value "secret_value_1_prod"
446446
az keyvault secret set --vault-name {KEY VAULT NAME} --name "Section--SecretName" --value "secret_value_2_prod"
447447
```
@@ -511,7 +511,7 @@ An app deployed to Azure App Service is automatically registered with Azure AD w
511511

512512
Using Azure CLI and the app's Object ID, provide the app with `list` and `get` permissions to access the key vault:
513513

514-
```azure-cli
514+
```azurecli
515515
az keyvault set-policy --name {KEY VAULT NAME} --object-id {OBJECT ID} --secret-permissions get list
516516
```
517517

@@ -592,7 +592,7 @@ When this approach is implemented:
592592

593593
1. Secrets are saved in Azure Key Vault using the following Azure CLI commands:
594594

595-
```azure-cli
595+
```azurecli
596596
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5000-AppSecret" --value "5.0.0.0_secret_value_prod"
597597
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5100-AppSecret" --value "5.1.0.0_secret_value_prod"
598598
```

0 commit comments

Comments
 (0)