Skip to main contentCloud-Native Toolkit

Destroying

Use the Cloud-Native Toolkit environment to delete itself

Not only can the Cloud-Native Toolkit create the environment, the environment can also delete itself. The environment is installed using Terraform, which stores the state of the applied modules in the workspace/{cluster name} folder. Terraform can use that state to delete what it installed.

Destroy a environment following these steps:

  1. Run the following command to launch a Developer Tools container:

    ./launch.sh
  2. In the container, change to the workspace/{cluster name} directory:

    cd workspace/{cluster name}
  3. In the container, run the destroy.sh script to apply the Terraform destroy:

    ./destroy.sh

    Rather than directly running terraform desroy, the destroy.sh script first builds a “destroy plan” from the current state then applies that plan. Performing the destroy in this way is more reliable and allows for certain resources to be selectively destroyed/saved.