Skip to content

feat(vpn): add network_config to VPN gateway resource - #1748

Closed
itrich wants to merge 2 commits into
stackitcloud:mainfrom
Europa-Park-DD:feat/vpn-network-config
Closed

feat(vpn): add network_config to VPN gateway resource#1748
itrich wants to merge 2 commits into
stackitcloud:mainfrom
Europa-Park-DD:feat/vpn-network-config

Conversation

@itrich

@itrich itrich commented Sep 7, 2026

Copy link
Copy Markdown

Exposes networkConfig (predefinedNetworkPrefix, routingTableId) on stackit_vpn_gateway. See API specs for more information.

Description

  • Adds network_config (predefined_network_prefix, routing_table_id) to the
    stackit_vpn_gateway resource and data source, letting users attach a custom
    predefined network prefix and/or routing table.
  • predefined_network_prefix is RequiresReplace, matching the API's
    constraint that it can't be changed after gateway creation.

Blocker ⚠️

  • Works around a live API bug: the generated SDK types
    NetworkConfig.PredefinedNetworkPrefix as []string, but the API actually
    accepts and returns a plain string. Reported upstream at
    predefinedNetworkPrefix must be a string stackit-api-specifications#69. Until that's fixed and a new
    SDK version is released, this PR routes the value through
    AdditionalProperties on the way out and reads the first slice element on
    the way in. Follow-up cleanup commit planned once the spec/SDK fix ships.

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)

Exposes networkConfig (predefinedNetworkPrefix, routingTableId) on
stackit_vpn_gateway. See API specs for more information.

Signed-off-by: Eduard Itrich <eduard.itrich@europapark.de>
@itrich
itrich requested a review from a team as a code owner September 7, 2026 12:53
@SerseusWasTaken SerseusWasTaken added duplicate This issue or pull request already exists domain:Access labels Sep 8, 2026
@SerseusWasTaken

Copy link
Copy Markdown
Contributor

Hello @itrich, thank you for your contribution!

We already have a contribution that addresses this here #1720 and since we already have a internal tracking issue for that PR and it adds a few more features, we will proceed with that one. Therefore i will close your PR as a duplicate, sorry about that. If i missed anything and #1720 implements something different than you did, please feel free to ping me and reopen the PR.

Additionally, thank you for reporting the API issue. I will get into contact with the respective service team to get this fixed ASAP.

Again, feel free to reopen the PR or ping me if you have any concerns.

Best regards,
Jonas from the STACKIT Developer Tools team

@itrich

itrich commented Sep 8, 2026

Copy link
Copy Markdown
Author

No problem @SerseusWasTaken and thank you for making me aware of the pending PR #1720. I'm happy to test this in our local fork (which we need to manage our VPN Gateway).

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

Labels

domain:Access duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants