Cohesity Cloud Scale Technology Deployment Guide Using Terraform for Microsoft Azure

Last Published:
Product(s): NetBackup & Alta Data Protection (11.0)

Cleanup steps

These steps are to be followed if you wish to cleanup the resource which are created during the deployment including infrastructure and product deployment.

Terraform destroy command can be used to destroy the resources created during the deployment. The destroy operation is performed in reverse order from that of creation. It is used instead of deleting the assets individually.

Note:

Before executing the terraform destroy command, execute the following command:

"TOKEN=$(az acr login --name acr_name --expose-token --output tsv --query accessToken);helm registry login acr_name --username 00000000-0000-0000-0000-000000000000 --password $TOKEN""

Sequence to cleanup the deployment infrastructure

Pass the input variable files (.tfvars) which were used during creation. Navigate to the respective directories and execute the following commands:

  1. Deployment:

    cd azure/deployment

    terraform destroy -var-file <vars-file>.tfvars

    You may need to run the destroy command twice to cleanup the environment.

    Note:

    It may happen that even after executing the destroy command, the environment is not cleaned. Execute the manual steps to cleanup the remains. Refer to the pt.3 from theSee Troubleshooting issues.

  2. Addons:

    cd azure/addons

    terraform destroy

  3. Base:

    cd azure/base

    terraform destroy -var-file <vars-file>.tfvars

Sequence to cleanup the values from Deployment and Addons

  1. Deploy base

  2. Deploy addons

  3. Deploy deployment

  4. Destroy deployment

  5. Execute the following commands:

    kubectl delete pvc --all -n netbackup

    kubectl delete pvc --all -n netbackup-operator-system

    kubectl delete pv --all

  6. Destroy addons