ezgh compute network-gateways attach <gateway> --vpc <vpc> [--add-default-route=false] [flags]Attach a network gateway to a VPC of the project (needs permission to update the VPC too). A VPC has at most one (vpc_has_gateway).
Attaching changes no routes. --add-default-route (on by default) then routes 0.0.0.0/0 and ::/0 in the VPC’s main route table to the gateway, where the table lacks them or they point at a gateway that’s gone, unless the table changes meanwhile; it says on stderr what it added. A gateway already attached keeps its routes as they are: running attach again doesn’t restore routes removed since, and it says how to add them. --add-default-route=false leaves the routes alone: a subnet whose table has no route to the gateway has no internet path.
Part of ezgh compute network-gateways.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--add-default-route |
boolean | true |
route 0.0.0.0/0 and ::/0 in the VPC’s main route table to the gateway |
--vpc |
string | the VPC (ID, UUID or name; required) |
This command also takes the global flags.