Skip to main content
Version: 5.17.0

Destroy Collaboration Add-ons

The infrastructure for collaboration add-ons will be destroyed when the underlying cluster is destroyed, which can be done by initializing your Terragrunt environment and running terragrunt run-all destroy. See the Destroy an RKE2 Cluster documentation for more detailed information for how to destroy your cluster.

Destroy a Collaboration Add-on

To destroy a particular collaboration add-on without destroying the entire underlying cluster:

Disable the CaC for the add-on, as described in Installation Options. The add-on should have its IaC and CaC both disabled. Otherwise, you may get errors on the cluster if the add-on CaC stays enabled while its IaC is destroyed.

cd REPO_PATH
export TF_PLUGIN_CACHE_DIR="$(pwd)/.terragrunt-cache/providers/"
export TERRAGRUNT_ENV_FILE="$(pwd)/infra-iac/envs/your-custom-env.hcl"
export WORKSPACE_NAME="your-workspace-name"
cd infra
terragrunt run-all init --terragrunt-parallelism=1
terragrunt run-all workspace select $WORKSPACE_NAME
terragrunt -terragrunt-working-dir modules/<addon_name> destroy

If an add-on was initially deployed on a long-lived cluster, it may have the "persistent" flag enabled. This will prevent certain resources from being deleted by Terragrunt unless the flag is removed. For example, the "persistent" flag will enable deletion protection on RDS and will protect the S3 bucket used for access logging from deletion. Verify whether your cluster has been deployed with the "persistent" flag by checking the configured options in your env.hcl file.

note

Once the IaC for the add-on is destroyed, it can be permanently disabled by setting skip = true in its infra-iac/modules/<addon_name>/terragrunt.hcl file. Otherwise, it will be re-created on any subsequent terragrunt run-all apply.