Skip to content

Bump netbird to v0.74.7 and adapt reverse proxy service resource - #169

Merged
bison merged 2 commits into
netbirdio:mainfrom
bison:chore/netbird-bump
Jul 22, 2026
Merged

Bump netbird to v0.74.7 and adapt reverse proxy service resource#169
bison merged 2 commits into
netbirdio:mainfrom
bison:chore/netbird-bump

Conversation

@bison

@bison bison commented Jul 22, 2026

Copy link
Copy Markdown
Member

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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Documentation

    • Updated reverse proxy service examples to use the current list-based targets and attribute-based auth configuration syntax.
  • Bug Fixes

    • Improved reverse proxy service configuration handling so target and authentication settings are correctly included when creating services.
    • Enhanced validation for target configuration, including empty or optional host and path values.

bison added 2 commits July 22, 2026 14:53
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.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Reverse 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.

Changes

Reverse proxy service mapping

Layer / File(s) Summary
Update reverse proxy configuration examples
examples/resources/netbird_reverse_proxy_service/resource.tf, docs/resources/reverse_proxy_service.md
Examples and documentation represent targets as a list and auth as nested attribute maps.
Map Terraform values to API pointers
internal/provider/reverse_proxy_service_resource.go, internal/provider/reverse_proxy_service_test.go
Conversion initializes authentication and assigns targets through a pointer; tests validate nil handling and target fields.

Dependency metadata

Layer / File(s) Summary
Refresh Go module metadata
go.mod
Go version, direct and indirect dependencies, and selected replacement revisions are updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

I hopped through targets, one by one,
And mapped auth beneath the sun.
Pointers now know where to go,
Tests keep watch in rows below.
Fresh module versions gleam—
A tidy burrow, neat as dream.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the NetBird upgrade and the reverse proxy service adaptation, matching the main changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between f865f5c and 95e2221.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • docs/resources/reverse_proxy_service.md
  • examples/resources/netbird_reverse_proxy_service/resource.tf
  • go.mod
  • internal/provider/reverse_proxy_service_resource.go
  • internal/provider/reverse_proxy_service_test.go

Comment thread go.mod
module github.com/netbirdio/terraform-provider-netbird

go 1.25
go 1.25.8

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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 || true

Repository: 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 -n

Repository: 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.

@bison
bison merged commit b779ff8 into netbirdio:main Jul 22, 2026
9 checks passed
@bison
bison deleted the chore/netbird-bump branch July 22, 2026 14:45
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