Skip to content

feat(albwaf): onboard WAF - #1612

Open
SerseusWasTaken wants to merge 7 commits into
mainfrom
feat/onboard-waf-resource
Open

feat(albwaf): onboard WAF#1612
SerseusWasTaken wants to merge 7 commits 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
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go Outdated
@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch 3 times, most recently from d9fa9f6 to 5b601ad Compare July 28, 2026 05:52
Comment thread docs/data-sources/alb_waf_configuration.md Outdated
Comment thread docs/resources/alb_waf_configuration.md Outdated
Comment thread docs/resources/alb_waf_configuration.md Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/datasource.go Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/datasource.go Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go Outdated
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go
Comment thread stackit/internal/services/albwaf/waf_configuration/resource.go Outdated
@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch from 5b601ad to ff1b28b Compare July 31, 2026 06:50
Comment on lines -25 to +26
//go:embed testdata/managed-rule-set.tf
managedRuleSetConfig string
//go:embed testdata/resource-max.tf
wafConfig string

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.

In the acc tests the resources should be in independent tests. So for the managed rule set, it should remain like before and for the new waf_configuration, there should be a new test terraform config added with a separate test function.
Otherwise it will be difficult in the future to maintain it, when the test config grows with each new resource. In the new test config for waf_config, you can also add a waf_managed_rule_set. But there you don't need to add checks for the waf_managed_ruleset.
See for example the test configs of kms: https://github.com/stackitcloud/terraform-provider-stackit/tree/770998656083e829003cc3ed1c067739cc3033d3/stackit/internal/services/kms/testdata

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.

I see. I re-added the deleted test and minimized the checks for waf managed rule set from the max test

@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch 3 times, most recently from fc9d078 to 1a97b9b Compare August 3, 2026 05:48
@SerseusWasTaken
SerseusWasTaken force-pushed the feat/onboard-waf-resource branch from 1a97b9b to b8e6408 Compare August 3, 2026 07:55
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Merging this branch changes the coverage (1 decrease, 1 increase)

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/managed_rule_set 8.13% (-0.83%) 👎
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration 12.70% (+12.70%) 🎉

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/managed_rule_set/datasource.go 0.00% (ø) 46 0 46
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/managed_rule_set/resource.go 10.43% (-1.02%) 163 (-3) 17 (-2) 146 (-1) 👎
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration/datasource.go 0.00% (ø) 45 (+45) 0 45 (+45)
github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/albwaf/waf_configuration/resource.go 15.58% (+15.58%) 199 (+199) 31 (+31) 168 (+168) 🎉
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/managed_rule_set/resource_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.

2 participants