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: aspnetcore/azure/devops/deploying-to-app-service.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,33 +79,33 @@ To deploy the app, you'll need to create an App Service [Web App](/azure/app-ser
79
79
80
80
b. Create a resource group. Resource groups provide a means to aggregate Azure resources to be managed as a group.
81
81
82
-
```azure-cli
82
+
```azurecli
83
83
az group create --location centralus --name AzureTutorial
84
84
```
85
85
86
86
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.
87
87
88
88
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.
89
89
90
-
```azure-cli
90
+
```azurecli
91
91
az appservice plan create --name $webappname --resource-group AzureTutorial --sku S1
92
92
```
93
93
94
94
d. Create the web app resource using the App Service plan in the same resource group.
95
95
96
-
```azure-cli
96
+
```azurecli
97
97
az webapp create --name $webappname --resource-group AzureTutorial --plan $webappname
98
98
```
99
99
100
100
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.
101
101
102
-
```azure-cli
102
+
```azurecli
103
103
az webapp deployment user set --user-name REPLACE_WITH_USER_NAME --password REPLACE_WITH_PASSWORD
104
104
```
105
105
106
106
f. Configure the web app to accept deployments from local Git and display the *Git deployment URL*. **Note this URL for reference later**.
Copy file name to clipboardExpand all lines: aspnetcore/security/key-vault-configuration.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,13 +79,13 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
79
79
80
80
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):
81
81
82
-
```azure-cli
82
+
```azurecli
83
83
az group create --name "{RESOURCE GROUP NAME}" --location {LOCATION}
84
84
```
85
85
86
86
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):
87
87
88
-
```azure-cli
88
+
```azurecli
89
89
az keyvault create --name {KEY VAULT NAME} --resource-group "{RESOURCE GROUP NAME}" --location {LOCATION}
90
90
```
91
91
@@ -95,7 +95,7 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
95
95
96
96
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:
97
97
98
-
```azure-cli
98
+
```azurecli
99
99
az keyvault secret set --vault-name {KEY VAULT NAME} --name "SecretName" --value "secret_value_1_prod"
100
100
az keyvault secret set --vault-name {KEY VAULT NAME} --name "Section--SecretName" --value "secret_value_2_prod"
101
101
```
@@ -165,7 +165,7 @@ An app deployed to Azure App Service is automatically registered with Azure AD w
165
165
166
166
Using Azure CLI and the app's Object ID, provide the app with `list` and `get` permissions to access the key vault:
167
167
168
-
```azure-cli
168
+
```azurecli
169
169
az keyvault set-policy --name {KEY VAULT NAME} --object-id {OBJECT ID} --secret-permissions get list
170
170
```
171
171
@@ -265,7 +265,7 @@ When this approach is implemented:
265
265
266
266
1. Secrets are saved in Azure Key Vault using the following Azure CLI commands:
267
267
268
-
```azure-cli
268
+
```azurecli
269
269
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5000-AppSecret" --value "5.0.0.0_secret_value_prod"
270
270
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5100-AppSecret" --value "5.1.0.0_secret_value_prod"
271
271
```
@@ -425,13 +425,13 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
425
425
426
426
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):
427
427
428
-
```azure-cli
428
+
```azurecli
429
429
az group create --name "{RESOURCE GROUP NAME}" --location {LOCATION}
430
430
```
431
431
432
432
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):
433
433
434
-
```azure-cli
434
+
```azurecli
435
435
az keyvault create --name {KEY VAULT NAME} --resource-group "{RESOURCE GROUP NAME}" --location {LOCATION}
436
436
```
437
437
@@ -441,7 +441,7 @@ The instructions provided by the [Quickstart: Set and retrieve a secret from Azu
441
441
442
442
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:
443
443
444
-
```azure-cli
444
+
```azurecli
445
445
az keyvault secret set --vault-name {KEY VAULT NAME} --name "SecretName" --value "secret_value_1_prod"
446
446
az keyvault secret set --vault-name {KEY VAULT NAME} --name "Section--SecretName" --value "secret_value_2_prod"
447
447
```
@@ -511,7 +511,7 @@ An app deployed to Azure App Service is automatically registered with Azure AD w
511
511
512
512
Using Azure CLI and the app's Object ID, provide the app with `list` and `get` permissions to access the key vault:
513
513
514
-
```azure-cli
514
+
```azurecli
515
515
az keyvault set-policy --name {KEY VAULT NAME} --object-id {OBJECT ID} --secret-permissions get list
516
516
```
517
517
@@ -592,7 +592,7 @@ When this approach is implemented:
592
592
593
593
1. Secrets are saved in Azure Key Vault using the following Azure CLI commands:
594
594
595
-
```azure-cli
595
+
```azurecli
596
596
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5000-AppSecret" --value "5.0.0.0_secret_value_prod"
597
597
az keyvault secret set --vault-name {KEY VAULT NAME} --name "5100-AppSecret" --value "5.1.0.0_secret_value_prod"
0 commit comments