NAME
gcluster destroy - destroys all resources in a Cluster Toolkit
deployment directory.
SYNOPSIS
gcluster destroy DEPLOYMENT_DIRECTORY [FLAGS]
DESCRIPTION
The gcluster destroy command destroys all resources managed by the specified
deployment directory. It typically tears down infrastructure in the reverse
order of creation. For more information about deploying resources, see the
gcluster deploy command.
FLAGS
-a,--artifacts ARTIFACTS_DIR: The directory where deployment artifacts are stored. If you omit this flag, then thegclusterCLI configures the directory automatically.--auto-approve: Automatically approves destruction without prompting.--parallelism N: Limits the number of concurrent Terraform operations. Specify an integer of0or greater:1or greater: passesNto Terraform and overrides theGCLUSTER_TERRAFORM_PARALLELISMenvironment variable.0or omitted: uses theGCLUSTER_TERRAFORM_PARALLELISMenvironment variable if set to a positive integer, or falls back to the Terraform default of10.
--skip GROUPS: A comma-separated list of group names to skip during destruction.--only GROUPS: A comma-separated list of group names to destroy exclusively. You can't use this flag with the--skipflag.--robust: Cleans up residual firewall rules and retries destruction if Google Kubernetes Engine (GKE) cluster reachability issues occur.
EXAMPLES
To destroy all resources in a deployment directory:
gcluster destroy ./my-deployment
To automatically approve and destroy resources without prompting:
gcluster destroy ./my-deployment --auto-approve
To destroy only a specific group within the deployment directory:
gcluster destroy ./my-deployment --only=primary-cluster
To perform a robust destroy, cleaning up residual firewall rules:
gcluster destroy ./my-deployment --robust --auto-approve