tazuna destroy
Deletes Tazuna-managed resources from the cluster. To prevent accidents, a two-stage guard is in place.
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy [-f tazuna.yaml] \
[--tags ...] [--force] [--no-cache | --offline]
Behavior
-
Load and validate
tazuna.yaml. -
If
spec.context_matchesis set, match against the current-context. Abort immediately on mismatch. -
If
--forceis not set, display the following prompt and require Y/N confirmation.!!! All resources managed by Tazuna will be deleted !!! Are you sure you want to delete them? -
Unless the environment variable
TAZUNA_DESTROY_EXECUTABLEistrue, only log output happens and the command exits without touching the cluster. -
Only when both guards pass: applies the
--tagsfilter, then invokes each Manager’s Destroy in order to delete the corresponding resources from the cluster.
In other words, resources are not deleted unless both “Yes at the prompt” and “TAZUNA_DESTROY_EXECUTABLE=true” are satisfied.
Flag
In addition to global flags, the following are accepted.
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--force | - | bool | false | Skips the pre-deletion confirmation prompt. It does not skip the environment-variable guard. |
--tags | -t | []string | [] | Targets only Manifests with at least one of the specified tags for deletion (OR evaluation). |
--no-cache | - | bool | false | For type: oras Manifests, always refetch from the registry without using the cache. |
--offline | - | bool | false | For type: oras Manifests, forbid access to the registry. |
--no-cache and --offline cannot be specified together.
Environment Variables
| Environment Variables | Value | Description |
|---|---|---|
TAZUNA_DESTROY_EXECUTABLE | true | Unless this is set, destroy does not delete anything. It is a kill switch to prevent destroy from accidentally running in CI. |
Examples
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy --tags experimental
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy --force
Related
- Evaluated
context_matches - The applying side:
tazuna apply