Skip to content

feat(albwaf): onboard WAF#1612

Open
SerseusWasTaken wants to merge 1 commit into
mainfrom
feat/onboard-waf-resource
Open

feat(albwaf): onboard WAF#1612
SerseusWasTaken wants to merge 1 commit into
mainfrom
feat/onboard-waf-resource

Conversation

@SerseusWasTaken

Copy link
Copy Markdown
Contributor

Relates to STACKITTPR-749

Description

Onboards WAF

Checklist

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

@SerseusWasTaken
SerseusWasTaken requested a review from a team as a code owner July 24, 2026 13:27
@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch 3 times, most recently from 6cbea1f to 3a169c3 Compare July 27, 2026 08:22
mapvalidator.KeysAre(
stringvalidator.RegexMatches(
// Regex validates that no stackit- prefix is used
regexp.MustCompile(`^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9_.-]{0,6}[a-zA-Z0-9]|(?:[a-rt-zA-Z0-9][a-zA-Z0-9_.-]{7}|s[a-su-zA-Z0-9_.-][a-zA-Z0-9_.-]{6}|st[b-zA-Z0-9_.-][a-zA-Z0-9_.-]{5}|sta[a-bd-zA-Z0-9_.-][a-zA-Z0-9_.-]{4}|stac[a-jl-zA-Z0-9_.-][a-zA-Z0-9_.-]{3}|stack[a-hj-zA-Z0-9_.-][a-zA-Z0-9_.-]{2}|stacki[a-su-zA-Z0-9_.-][a-zA-Z0-9_.-]|stackit[a-zA-Z0-9_.])[a-zA-Z0-9_.-]{0,54}[a-zA-Z0-9])$`),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This regex is ridiculously complex, but only because negative lookaheads not possible are using regexp.MustCompile.

@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch from 3a169c3 to f5b35c4 Compare July 27, 2026 08:33
Relates to STACKITTPR-749
@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch from f5b35c4 to 0226c30 Compare July 27, 2026 09:08
@github-actions

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit 1.17% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf 0.00% (ø)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration 18.35% (+18.35%) 🎉

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration/datasource.go 0.00% (ø) 49 (+49) 0 49 (+49)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration/resource.go 22.48% (+22.48%) 218 (+218) 49 (+49) 169 (+169) 🌟
github.com/stackitcloud/terraform-provider-stackit/stackit/provider.go 1.17% (ø) 171 2 169

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/terraform-provider-stackit/stackit/internal/services/albwaf/albwaf_acc_test.go
  • github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration/resource_test.go

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.

1 participant