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¶
- Create
resources/<service>-<thing>.go. - Implement the libnuke contract — see
resources/compute-server.gofor the reference shape: init()callingregistry.Register- struct embedding
*BaseResource Remove(ctx) error,Properties() types.Properties,String() string- sibling
<Name>ListerwithList(ctx, opts any) ([]resource.Resource, error) - Use the STACKIT SDK service package that owns the resource (
github.com/stackitcloud/stackit-sdk-go/services/<svc>). Build the client fromopts.(*stackit.ListerOpts).Credentials.SDKConfigForRegion(opts.Region). - Add a docs page under
docs/resources/and a nav entry inmkdocs.yml. - 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.