Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 1.79 KB

cleanup.md

File metadata and controls

75 lines (49 loc) · 1.79 KB
title layout nav_order
Clean up resources
home
90

Cleanup

{: .no_toc }

If you're not going to continue to use this lab environment, run the following command to delete the resource group along with all the resources created in this lab.

  • TOC {:toc}

{: .note }

There is a known issue when delete OpenAI instance, Azd down on OpenAI instance, extra steps required to delete all the resources.

Delete environment created by Azd automation

  1. Prepare

    • Set config flag for OpenAI instance

      azd config set alpha.deployment.stacks on
  2. Tear down the azd environment

    • list all the azd environments

      azd env list
    • run `` to clean up the target environment

      azd down -e <env-name> --force --purge

Delete environment created by manual steps

  1. Clean up the Azure Cognitive Services account

    • list the deployments

      az cognitiveservices account deployment list -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME -o table
    • delete the deployments one by one

      az cognitiveservices account deployment delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME --deployment-name gpt-4o
      az cognitiveservices account deployment delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME --deployment-name text-embedding-ada-002
    • delete the Azure Cognitive Services account

      az cognitiveservices account delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME
  2. Delete the resource group with all the resources

    az group delete --name $RESOURCE_GROUP
    
    az configure --default group=''

{: .note }

It takes about 30 minutes to delete all the resources in the environment.