## 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`](https://docs.cloud.google.com/cluster-toolkit/docs/reference/gcluster-deploy.md.txt) command.

## FLAGS

- `-a`, `--artifacts ARTIFACTS_DIR`: The directory where deployment artifacts are stored. If you omit this flag, then the `gcluster` CLI configures the directory automatically.
- `--auto-approve`: Automatically approves destruction without prompting.
- `--parallelism N`: Limits the number of concurrent
  Terraform operations. Specify an integer of `0` or greater:

  - `1` or greater: passes `N` to Terraform and overrides the `GCLUSTER_TERRAFORM_PARALLELISM` environment variable.
  - `0` or omitted: uses the `GCLUSTER_TERRAFORM_PARALLELISM` environment variable if set to a positive integer, or falls back to the Terraform default of `10`.
- `--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 `--skip` flag.

- `--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:

```bash
gcluster destroy ./my-deployment
```

To automatically approve and destroy resources without prompting:

```bash
gcluster destroy ./my-deployment --auto-approve
```

To destroy only a specific group within the deployment directory:

```bash
gcluster destroy ./my-deployment --only=primary-cluster
```

To perform a robust destroy, cleaning up residual firewall rules:

```bash
gcluster destroy ./my-deployment --robust --auto-approve
```