Skip to content

Commit a895aec

Browse files
committed
add clean-up steps
1 parent 36d1625 commit a895aec

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

articles/app-service/tutorial-connect-msi-keyvault.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ Prepare your environment for the Azure CLI.
5858
csKey1=$(az cognitiveservices account keys list --resource-group $groupName --name $csResourceName --query key1 --output tsv)
5959
```
6060
61+
> [!NOTE]
62+
> `--sku F0` creates a free tier Cognitive Services resource. Each subscription is limited to a quota of one free-tier `TextAnalytics` resource. If you're already over the quota, use `--sku S` instead.
63+
6164
1. Clone the sample repository locally and deploy the sample application to App Service. Replace *\<app-name>* with a unique name.
6265
6366
### [.NET 5](#tab/dotnet)
@@ -70,7 +73,7 @@ Prepare your environment for the Azure CLI.
7073
git clone https://github.com/Azure-Samples/app-service-language-detector.git
7174
cd app-service-language-detector/dotnet
7275
73-
az webapp up --sku F1 --resource-group $groupName --name $appName --location $region
76+
az webapp up --sku F1 --resource-group $groupName --name $appName --plan $appName --location $region
7477
```
7578
7679
### [PHP](#tab/php)
@@ -132,7 +135,7 @@ At the moment, connection secrets are stored as app settings in your App Service
132135
az webapp identity assign --resource-group $groupName --name $appName --scope $vaultResourceId --role "Key Vault Secrets User"
133136
```
134137
135-
1. Add the Cognitive Services resource name and subscription key as secrets to the vault, and save their IDs as environment variables.
138+
1. Add the Cognitive Services resource name and subscription key as secrets to the vault, and save their IDs as environment variables for the next step.
136139
137140
```azurecli-interactive
138141
csResourceKVUri=$(az keyvault secret set --vault-name $vaultName --name csresource --value $csResourceName --query id --output tsv)
@@ -149,6 +152,16 @@ At the moment, connection secrets are stored as app settings in your App Service
149152
150153
Congratulations, your app is now connecting to Cognitive Services using secrets kept in your key vault, and you've done this without any changes to your application code.
151154
155+
## Clean up resources
156+
157+
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, delete the resource group by running the following command in the Cloud Shell:
158+
159+
```azurecli-interactive
160+
az group delete --name $groupName
161+
```
162+
163+
This command may take a minute to run.
164+
152165
## Next steps
153166

154167
- [Tutorial: Isolate back-end communication with Virtual Network integration](tutorial-networking-isolate-vnet.md)

articles/app-service/tutorial-networking-isolate-vnet.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ Because your Key Vault and Cognitive Services resources will sit behind [private
130130
> [!TIP]
131131
> `$csResourceName` is set in the [prerequisite](#prerequisites) tutorial (in [Create app with connectivity to Cognitive Services](tutorial-connect-msi-keyvault.md#create-app-with-connectivity-to-Cognitive-Services)).
132132
133-
Now, all traffic to the key vault and the Cognitive Services resource is blocked. If you try out the language detection page now, you'll get an HTTP 500 error. These two endpoints are only accessible to clients inside the VNet you created. You can't even access Key Vault secrets through the Azure portal, because the portal accesses them through the public internet (see [Manage the locked down resources](#manage-the-locked-down-resources)).
133+
It may take some time for the setting to take effect, but all traffic to the key vault and the Cognitive Services resource are now blocked. If you try out the language detection page now, you'll get an HTTP 500 error.
134+
135+
<!-- TODO - This seems to take a long time to take effect. -->
136+
137+
These two endpoints are only accessible to clients inside the VNet you created. You can't even access the secrets in the key vault through **Secrets** page in the Azure portal, because the portal accesses them through the public internet (see [Manage the locked down resources](#manage-the-locked-down-resources)).
134138
135139
## Configure VNet integration in your app
136140
@@ -154,7 +158,9 @@ Now, all traffic to the key vault and the Cognitive Services resource is blocked
154158
155159
VNet integration allows outbound traffic to flow directly into the VNet. By default, only local IP traffic defined in [RFC-1918](https://tools.ietf.org/html/rfc1918#section-3) is routed to the VNet, which is what you need for the private endpoints. To route all your traffic to the VNet, set the [`WEBSITE_VNET_ROUTE_ALL` app setting](reference-app-settings.md#networking). Routing all traffic can also be used if you want to route internet traffic through your VNet e.g. through an [Azure VNet NAT](../virtual-network/nat-gateway/nat-overview.md) or an [Azure Firewall](../firewall/overview.md).
156160
157-
1. In the browser, navigate to `<app-name>.azurewebsites.net` again and wait for the app to restart. If you get detection results back, then you're connecting to the Cognitive Services endpoint with key vault references.
161+
1. In the browser, navigate to `<app-name>.azurewebsites.net` again and wait for the integration to take effect. If you get detection results back, then you're connecting to the Cognitive Services endpoint with key vault references. If you get an HTTP 500 error, wait a few minutes and try again.
162+
163+
<!-- TODO - This seems to take a long time to take effect. -->
158164
159165
## Manage the locked down resources
160166
@@ -165,6 +171,16 @@ Depending on your scenarios, you may not be able to manage the private endpoint
165171
- Manage the private endpoint protected resources from a [jump server](https://wikipedia.org/wiki/Jump_server) in the VNet.
166172
- [Deploy Cloud Shell into the VNet](../cloud-shell/private-vnet.md).
167173
174+
## Clean up resources
175+
176+
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, delete the resource group by running the following command in the Cloud Shell:
177+
178+
```azurecli-interactive
179+
az group delete --name $groupName
180+
```
181+
182+
This command may take a minute to run.
183+
168184
## Next steps
169185

170186
- [Integrate your app with an Azure virtual network](overview-vnet-integration.md)

0 commit comments

Comments
 (0)