Skip to content

Contributing

Thanks for helping improve stackit-nuke!

Local setup

git clone https://github.com/qaiser42/stackit-nuke
cd stackit-nuke
make build
./stackit-nuke --version

Requires Go 1.26+.

Adding a new resource type

  1. Create resources/<service>-<thing>.go.
  2. Implement the libnuke contract — see resources/compute-server.go for the reference shape:
  3. init() calling registry.Register
  4. struct embedding *BaseResource
  5. Remove(ctx) error, Properties() types.Properties, String() string
  6. sibling <Name>Lister with List(ctx, opts any) ([]resource.Resource, error)
  7. Use the STACKIT SDK service package that owns the resource (github.com/stackitcloud/stackit-sdk-go/services/<svc>). Build the client from opts.(*stackit.ListerOpts).Credentials.SDKConfigForRegion(opts.Region).
  8. Add a docs page under docs/resources/ and a nav entry in mkdocs.yml.
  9. Add a test alongside the file (table-driven, mock the SDK client).

Tests, lint, release

make test    # go test -race -cover ./...
make lint    # golangci-lint
make snapshot # goreleaser --snapshot

Commit / PR style

  • Conventional Commits (feat:, fix:, docs:, ...).
  • One resource per PR keeps reviews tractable.
  • No AI attribution in commits or PR descriptions.