Skip to content

ezgh compute nat-gateways create

Create a NAT gateway.

Updated View as Markdown
ezgh compute nat-gateways create <name> --vpc <vpc> --subnet <subnet> [--wait] [flags]

Create a NAT gateway in a subnet of a VPC. The subnet must be public: the VPC has an attached Network Gateway (network_gateway_required otherwise) and the subnet’s route table routes 0.0.0.0/0 to it (subnet_not_public otherwise). Keep 4 addresses free in the subnet.

The gateway’s public IPv4 address is assigned at once, before the gateway is active. Creating a gateway changes no routes: send a private subnet’s traffic through it with ezgh compute route-tables routes set <table> 0.0.0.0/0 --target <nat_…>. --wait waits until it’s active and prints it.

Part of ezgh compute nat-gateways.

Examples

ezgh compute nat-gateways create egress --vpc main --subnet public --wait
ezgh compute route-tables routes set private 0.0.0.0/0 --target nat_…

Flags

Flag Type Default Description
--subnet string the public subnet the gateway goes in (ID, UUID or name; required)
--vpc string the VPC (ID, UUID or name; required)
--wait boolean wait until it’s active, and print it then
--wait-timeout duration 10m0s how long --wait waits

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close