vmware / terraform-provider-nsxt

Terraform Provider for VMware NSX
https://registry.terraform.io/providers/vmware/nsxt/
Mozilla Public License 2.0
132 stars 85 forks source link

Support NULL route for nsxt_policy_static_route #604

Closed andyjohnschneider closed 3 years ago

andyjohnschneider commented 3 years ago

The NSX-T GUI and API support a static NULL route, i.e. a route whose nexthop is NULL. The resource nsxt_policy_static_route forces IP address as a mandatory parameter, but this does not follow the schema of the API - which allows for IP address to be omitted.

Below is an example result of setting a route for destination 1.2.3.4/32 to NULL:

    "results": [
        {
            "network": "1.2.3.4/32",
            "next_hops": [
                {
                    "admin_distance": 1
                }
            ],
            "enabled_on_secondary": false,
            "resource_type": "StaticRoutes",
            "id": "nulltest",
            "display_name": "nulltest",
            "path": "/infra/tier-0s/T0/static-routes/nulltest",
        }
    ]
annakhm commented 3 years ago

Fixed