Skip to content

Conversation

h3adex
Copy link
Contributor

@h3adex h3adex commented Oct 10, 2025

Description

This PR adds functionality to list and describe routing tables, as well as perform full CRUD operations on routes within those tables. It does not include support for creating or attaching routing tables, as those operations are currently intended to be managed exclusively through Terraform.

This implementation is primarily aimed at enabling users to inspect and debug routes created via Terraform. Once the routing table feature reaches GA, support for creating routing tables and attaching them to networks will be added to the CLI.

Screenshot 2025-10-10 at 16 22 40

Checklist

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

@h3adex h3adex requested a review from a team as a code owner October 10, 2025 14:23
@h3adex h3adex force-pushed the feat/add-rt-support branch from 5b9fe56 to 45f6702 Compare October 10, 2025 14:24
cmd.Flags().Var(flags.CIDRFlag(), destinationValueFlag, "Destination value")
cmd.Flags().String(nextHopValueFlag, "", "NextHop value")

cmd.Flags().Var(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I introduced an enum flag here. I'm not certain if this matches our intended cli design, but I felt it would be beneficial to validate values early.

Labels: flags.FlagToStringToStringPointer(p, cmd, labelFlag),
}

// Next Hop validation logic
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also here I felt like it would be beneficial to validate values early. Can be tested with commands like:

bin/stackit beta routing-table route create --destination-type cidrv4 --destination-value 0.0.0.0/32 --nexthop-type internet --nexthop-value 1.1.1.1 --network-area-id xxx --organization-id yyy --routing-table-id zzz -o pretty

Expected: Error: --nexthop-value is not allowed when --nexthop-type is 'internet' or 'blackhole'

Short: "Manage routing-tables and its according routes",
Long: `Manage routing tables and their associated routes.

This functionality is currently in BETA. At this stage, only listing and describing
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this to give the user a hint, that this is more used for debugging rather than being used for creating routing-tables and attaching them to networks.

@h3adex
Copy link
Contributor Author

h3adex commented Oct 15, 2025

Update waiting for go-sdk iaas api update ^

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants