You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add nexthop parameter to cloudstack_static_route resource
This change adds support for the nexthop parameter in static routes,
which allows VPC-based routing without requiring a private gateway.
Resource Changes:
- Add nexthop and vpc_id optional parameters to schema
- nexthop is mutually exclusive with gateway_id
- When using nexthop, vpc_id is required
- When using gateway_id, nexthop and vpc_id are not allowed
- Update resource creation logic to support both routing methods:
- Private Gateway routing (gateway_id)
- VPC direct routing (nexthop + vpc_id)
- Update Read function to maintain plan stability for both modes
Test Coverage:
- Add comprehensive test coverage for both routing methods
- Add testAccPreCheckStaticRouteNexthop helper to check CloudStack version
- Automatically skip nexthop tests on CloudStack versions < 4.22.0
- Version check uses CloudStack capabilities API
- Tests are skipped (not failed) on older versions for backward compatibility
- All acceptance tests passing (2/2)
Documentation:
- Update documentation with examples for both routing methods
- Document mutual exclusivity requirements
- Note CloudStack 4.22+ requirement for nexthop support
CI/CD:
- Add CloudStack 4.22.0.0 to acceptance test matrix
- Ensures tests run on both old and new CloudStack versions
0 commit comments