Bump netbird to v0.74.7 and adapt reverse proxy service resource - #169
Conversation
Bump github.com/netbirdio/netbird from v0.66.2 to v0.74.7. The
ServiceRequest type changed in the new version:
- Targets: []ServiceTarget -> *[]ServiceTarget
- Auth: ServiceAuthConfig -> *ServiceAuthConfig
Adapt reverse_proxy_service_resource.go accordingly: build the targets
slice locally and assign its address, and initialize req.Auth before
populating its sub-configs. The Targets change was a compile break; the
Auth change was a latent nil-pointer panic (assigning through a nil
pointer) that only surfaced at runtime, caught by the unit tests. Update
the tests to dereference the now-pointer Targets field.
Also fix the reverse_proxy_service example (and regenerated docs) to use
nested-attribute syntax (targets = [...], auth = {...}) instead of block
syntax, matching the ListNestedAttribute/SingleNestedAttribute schema.
The dependency bump also updates google.golang.org/grpc to v1.82.1,
addressing GHSA-hrxh-6v49-42gf.
📝 WalkthroughWalkthroughReverse proxy examples now use list/map attribute syntax, and Terraform-to-API conversion assigns targets and authentication through initialized pointers. Related tests validate pointer handling, while Go and dependency versions are updated. ChangesReverse proxy service mapping
Dependency metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@go.mod`:
- Line 3: Update the Go version directive in go.mod from 1.25.8 to the intended
patched Go 1.25 release, or add an explicit newer toolchain directive while
retaining the module version if that is the intended support policy. Ensure CI
and release workflows using go.mod select the patched toolchain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4a322eca-5a85-4f4e-8075-3b0a0479013c
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (5)
docs/resources/reverse_proxy_service.mdexamples/resources/netbird_reverse_proxy_service/resource.tfgo.modinternal/provider/reverse_proxy_service_resource.gointernal/provider/reverse_proxy_service_test.go
| module github.com/netbirdio/terraform-provider-netbird | ||
|
|
||
| go 1.25 | ||
| go 1.25.8 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' 'Declared Go/toolchain versions:'
rg -n '^(go|toolchain) ' go.mod go.work 2>/dev/null || true
printf '%s\n' 'CI/container Go versions:'
rg -n 'setup-go|go-version|FROM golang:|GO_VERSION|toolchain go' .github Dockerfile* 2>/dev/null || trueRepository: netbirdio/terraform-provider-netbird
Length of output: 965
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' 'go.mod:'
sed -n '1,12p' go.mod | cat -n
printf '\n%s\n' '.github/workflows/test.yml:'
sed -n '20,90p' .github/workflows/test.yml | cat -n
printf '\n%s\n' '.github/workflows/release.yml:'
sed -n '18,40p' .github/workflows/release.yml | cat -nRepository: netbirdio/terraform-provider-netbird
Length of output: 4601
Bump the Go version pin
go-version-file: 'go.mod' in CI and release means go 1.25.8 becomes the default toolchain everywhere. Raise this to the patched Go 1.25 release you want to support, or add an explicit newer toolchain pin if you intend to keep the module line here.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@go.mod` at line 3, Update the Go version directive in go.mod from 1.25.8 to
the intended patched Go 1.25 release, or add an explicit newer toolchain
directive while retaining the module version if that is the intended support
policy. Ensure CI and release workflows using go.mod select the patched
toolchain.
Bump github.com/netbirdio/netbird from v0.66.2 to v0.74.7. The
ServiceRequest type changed in the new version:
Adapt reverse_proxy_service_resource.go accordingly: build the targets
slice locally and assign its address, and initialize req.Auth before
populating its sub-configs. The Targets change was a compile break; the
Auth change was a latent nil-pointer panic (assigning through a nil
pointer) that only surfaced at runtime, caught by the unit tests. Update
the tests to dereference the now-pointer Targets field.
Also fix the reverse_proxy_service example (and regenerated docs) to use
nested-attribute syntax (targets = [...], auth = {...}) instead of block
syntax, matching the ListNestedAttribute/SingleNestedAttribute schema.
The dependency bump also updates google.golang.org/grpc to v1.82.1,
addressing GHSA-hrxh-6v49-42gf.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Documentation
targetsand attribute-basedauthconfiguration syntax.Bug Fixes