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:
- Run the following command to launch a Developer Tools container: ./launch.sh
- In the container, change to the - workspace/{cluster name}directory:cd workspace/{cluster name}
- In the container, run the - destroy.shscript to apply the Terraform destroy:./destroy.sh- Rather than directly running - terraform desroy, the- destroy.shscript 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.