You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: real list+delete for Volume/Network/NIC/SecurityGroup + post-run summary
- ComputeVolume, Network, SecurityGroup wired against iaas/v2api
(previously stubs)
- New NetworkInterface resource type (ListNics scoped per Network)
- DependsOn graph: NIC after Server; Network after NIC; SG after NIC
- Compact log formatter strips libnuke property dump; --log-verbose
restores the full output
- Post-run summary prints a grouped list of nuked resources with an
ASCII art banner (only on --no-dry-run)
- dev-infra/nuke.yaml(.example) companion config covering the 5
implemented resource types; filters out the project default SG
- README: Concepts section, sample summary output, updated coverage
table (5/20 working)
- CHANGELOG: 0.0.2 entry
Copy file name to clipboardExpand all lines: README.md
+51-7Lines changed: 51 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,51 @@ stackit-nuke run --config config.yaml # dry run
60
60
stackit-nuke run --config config.yaml --no-dry-run # real
61
61
```
62
62
63
+
After a real run, you get a summary of everything deleted:
64
+
65
+
```
66
+
_ _.-'`-._
67
+
.-'` '-.
68
+
.' _ . - = - . _ '.
69
+
/ .-' '-. \
70
+
/ .' '. \
71
+
| / \ |
72
+
| | BOOM | |
73
+
| | | |
74
+
\ '. .' /
75
+
\ '-. .-' /
76
+
'. '-._ _.-' .'
77
+
'-. `'----'` .-'
78
+
`'-..__________..-'`
79
+
80
+
9 resource(s) nuked:
81
+
82
+
ComputeServer
83
+
- dev-server-0 (2bd1a04d)
84
+
- dev-server-1 (6adb84a9)
85
+
ComputeVolume
86
+
- stackit-nuke-dev-extra (bb668c22)
87
+
Network
88
+
- dev-net (6f452480)
89
+
NetworkInterface
90
+
- dev-nic-0-b7856b3 (605f8edd)
91
+
- dev-nic-1-cf66680 (3958de73)
92
+
```
93
+
63
94
Full docs: <https://qaiser42.io/stackit-nuke>
64
95
96
+
## Concepts
97
+
98
+
-**Project allow-list** — `project-ids` is the universe of what may be nuked. The CLI may *narrow* it (`--project-id`); it cannot widen. Without it, the tool refuses to start.
99
+
-**Blocklist** — `blocklist` is a hard veto. If any blocked ID also appears in `project-ids`, startup fails. Belt-and-suspenders against fat-fingering.
100
+
-**Dry-run default** — `run` lists what would be deleted. Real deletion requires `--no-dry-run`*and* (unless `--force`) typing the project ID back at a prompt.
101
+
-**Filters mark resources as ineligible** — counter-intuitive: a filter is a *keep-list*, not a kill-list. Anything matched by a filter survives; everything else gets deleted. Filter by `Name`, `tag:*`, etc.
102
+
-**Presets** — reusable named filter sets, attached to accounts via `presets: [...]`. Same shape as filters; just deduped at one site.
103
+
-**Resource type include/exclude** — `resource-types.includes` narrows the registered set; `excludes` always wins. Empty `includes` means all registered types.
104
+
-**Scopes** — every resource is `ProjectScope` today (region-aware, scoped to one STACKIT project). Engine also supports an `OrganizationScope` we have not yet used.
105
+
-**Dependency order** — each `Resource` declares `DependsOn`. libnuke topologically sorts and only deletes a resource once everything it depends on has finished. E.g. `Network` depends on `NetworkInterface` so NICs detach first.
106
+
-**Settings & feature-flags** — per-resource toggles (e.g. `EmptyBeforeDelete: true` for buckets) live under `settings:`. Engine behaviors (`wait-on-dependencies`, `filter-groups`) live under `feature-flags:`.
107
+
65
108
## How it works (101)
66
109
67
110
`stackit-nuke` is a thin CLI shell over [`libnuke`](https://github.com/ekristen/libnuke). We write the STACKIT-specific bits; libnuke does the engine work.
@@ -71,7 +114,7 @@ Full docs: <https://qaiser42.io/stackit-nuke>
71
114
`main.go` blank-imports `pkg/commands/...` and `resources/...`. Their `init()` functions:
- register **19 resource types** with `libnuke/pkg/registry` — each entry pairs a `Lister` (discover) with a `Resource` (delete) and optional `DependsOn` (ordering)
117
+
- register **20 resource types** with `libnuke/pkg/registry` — each entry pairs a `Lister` (discover) with a `Resource` (delete) and optional `DependsOn` (ordering)
75
118
76
119
No reflection, no plugin loader — pure compile-time wiring.
77
120
@@ -151,13 +194,14 @@ Legend: ✅ list + delete via real STACKIT SDK · 🟡 registered, lister return
**1 of 19 resources fully working.** The CLI / config / auth / libnuke engine are functional; the per-resource SDK wiring lands incrementally. Pick one above and follow [`resources/compute-server.go`](resources/compute-server.go) as the reference pattern — see [Contributing](docs/contributing.md).
217
+
**5 of 20 resources fully working.** The CLI / config / auth / libnuke engine are functional; the per-resource SDK wiring lands incrementally. Pick one above and follow [`resources/compute-server.go`](resources/compute-server.go) as the reference pattern — see [Contributing](docs/contributing.md).
174
218
175
219
## Development
176
220
@@ -189,8 +233,8 @@ Requires Go 1.25+.
189
233
[`dev-infra/`](dev-infra/) is a Pulumi project ([`@stackitcloud/pulumi-stackit`](https://www.pulumi.com/registry/packages/stackit/)) that spins up a small STACKIT footprint (network, NICs, servers, volume) you can repeatedly create + nuke + recreate while developing new resource implementations.
190
234
191
235
```bash
192
-
cd dev-infra &&npm install&& pulumi up
193
-
cd .. && ./stackit-nuke run --config examples/compute-only.yaml --no-dry-run
236
+
cd dev-infra &&go mod download&& pulumi up
237
+
cd .. && ./stackit-nuke run --config dev-infra/nuke.yaml --no-dry-run
Copy file name to clipboardExpand all lines: dev-infra/README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Throwaway STACKIT infrastructure for testing `stackit-nuke` locally.
4
4
5
-
Uses the **official Pulumi STACKIT provider** ([`@stackitcloud/pulumi-stackit`](https://www.pulumi.com/registry/packages/stackit/)) — currently alpha, IaaS + Resource Manager only.
5
+
Uses the **official Pulumi STACKIT provider** ([`pulumi-stackit`](https://www.pulumi.com/registry/packages/stackit/)) via its Go SDK — currently alpha, IaaS + Resource Manager only.
6
6
7
7
## What it deploys
8
8
@@ -16,18 +16,20 @@ All resources are labelled `managed-by=pulumi`, `purpose=stackit-nuke-dev` so yo
16
16
## Prerequisites
17
17
18
18
- Pulumi CLI (`brew install pulumi`)
19
-
-Node.js 20+
19
+
-Go 1.23+
20
20
- A STACKIT service-account key — same one `stackit-nuke` uses
21
21
22
22
## One-time setup
23
23
24
24
```bash
25
25
cd dev-infra
26
-
npm install
26
+
go mod download
27
27
pulumi login --local # or your usual backend
28
28
pulumi stack init dev
29
29
cp Pulumi.dev.yaml.example Pulumi.dev.yaml
30
30
$EDITOR Pulumi.dev.yaml # paste your project ID
31
+
cp nuke.yaml.example nuke.yaml
32
+
$EDITOR nuke.yaml # paste same project ID + sa-key path
0 commit comments