Authentication¶
stackit-nuke authenticates with the STACKIT API the same way the official STACKIT CLI does — via a service-account key.
Create a service account¶
- STACKIT Portal → your project → Service Accounts → create.
- Grant the service account the roles needed for the resources you want to delete (typically
project.ownerfor full destruction). - Generate a service-account key (JSON). Store the file securely — anyone with it can delete your resources.
Provide the key to stackit-nuke¶
In order of precedence:
- CLI flag:
--auth-file /path/to/sa-key.json - Environment variable:
STACKIT_SERVICE_ACCOUNT_KEY_PATH=/path/to/sa-key.json - Config file:
auth: service-account-key-path: ~/.stackit/sa-key.json
If the key references an external private key, point to it with --private-key-file or STACKIT_PRIVATE_KEY_PATH.
Token-based auth (CI shortcut)¶
For ephemeral environments you can skip the key file and pass a pre-issued bearer token:
export STACKIT_SERVICE_ACCOUNT_TOKEN=eyJhbGciOi...
stackit-nuke run --config config.yaml