Skip to content

feat(albwaf): onboard albwaf config - #1563

Open
SerseusWasTaken wants to merge 2 commits into
mainfrom
feat/onboard-albwaf-configuration
Open

feat(albwaf): onboard albwaf config#1563
SerseusWasTaken wants to merge 2 commits into
mainfrom
feat/onboard-albwaf-configuration

Conversation

@SerseusWasTaken

Copy link
Copy Markdown
Contributor

Description

Onboards the albwaf config

Update is missing since we only have a PUT endpoint

Relates to STACKITCLI-444

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-albwaf-configuration branch from a7c378e to cc4fc26 Compare August 24, 2026 13:25
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf 0.00% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config 0.00% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/create 53.49% (+53.49%) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/delete 32.26% (+32.26%) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/describe 80.00% (+80.00%) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/list 27.27% (+27.27%) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/custom-rule-group/delete 32.26% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/alb-waf.go 0.00% (ø) 4 0 4
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/config.go 0.00% (ø) 7 (+7) 0 7 (+7)
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/create/create.go 53.49% (+53.49%) 43 (+43) 23 (+23) 20 (+20) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/delete/delete.go 32.26% (+32.26%) 31 (+31) 10 (+10) 21 (+21) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/describe/describe.go 80.00% (+80.00%) 65 (+65) 52 (+52) 13 (+13) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/list/list.go 27.27% (+27.27%) 77 (+77) 21 (+21) 56 (+56) 🌟
github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/custom-rule-group/delete/delete.go 32.26% (ø) 31 10 21

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/describe/describe_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb-waf/config/list/list_test.go

@SerseusWasTaken
SerseusWasTaken marked this pull request as ready for review August 24, 2026 13:53
@SerseusWasTaken
SerseusWasTaken requested a review from a team as a code owner August 24, 2026 13:53

func formatLabels(labels map[string]string) string {
pairs := make([]string, 0, len(labels))
for v, k := range labels {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for v, k := range labels {
for k, v := range labels {

}

params.Printer.Info("Custom rule group %q deleted.\n", model.Name)
params.Printer.Outputf("Custom rule group %q deleted.\n", model.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prints to stdout, breaking -o json

return fmt.Errorf("delete ALB WAF configuration: %w", err)
}

params.Printer.Outputf("WAF configuration %q deleted.\n", model.Name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prints to stdout, breaking -o json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants