Cohesity Cloud Scale Technology Deployment Guide Using Terraform for AWS

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

Cleanup steps

These steps are to be followed if you wish to cleanup the resources 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.

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 aws/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.2 from the See Troubleshooting issues.

  2. Addons

    cd aws/addons

    terraform destroy

  3. Base

    cd aws/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