Skip to main content

Clean up

Deleting Azure resources

To delete the resources from Azure, from a VS Code terminal, run the following command:

azd down

This will prompt you to confirm that you want to delete the resources. Enter y to confirm.

Stop the GitHub Codespace

If you are using a GitHub Codespace, you will need to stop the codespace. To stop a codespace, from VS Code in your web browser, select F1 to open the command palette, then type and select Codespaces: Stop Codespace.

danger

As at Feburary 2023, GitHub personal accounts have up to 120 core hours per month of free codespaces usage. When you have completed the workshop, be sure to stop the current codespace to preserve your usage.

A "core hour" is a measure used for included compute usage. On a 2-core machine, you would get 60 hours free. On a 4-core machine, you would get 30 hours free, etc. Learn more

Purging the Form Recognizer resource

When deleting an Azure Form Recognizer resource, it's soft deleted so you can recover it in the event of an accidental deletion. You have a 48hrs to recover a Form Recognizer resource. For more information, see Recover deleted Cognitive Services resources

This is optional, as Azure will perform a hard delete after 48hrs. You can force an immediate hard delete using the following command:

region=<Azure Region selected>
resourceName=<Form Recognizer resource name>
resourceGroupName=<Resource group name>
az cognitiveservices account purge -l $region -n $resourceName -g $resourceGroupName
note

The resource group name and region were specified when you setup the project during the Create Azure resources step. The name of the Form Recognizer resource is prefixed with form-recognizer- and then a unique hash, that will be present in the logs when you cleaned up the resources in the previous step.

Social

Please tweet your questions, comments, and successes including hashtag #AzureFormRecognizer, the workshop link https://aka.ms/PatientRegistration, and tag @dglover. Thank you.