Skip to content

VPC NAT instance data model

Sachin Bansal edited this page Apr 30, 2014 · 2 revisions

Below are the steps:

  1. Create a NAT service instance with public network as its right network and a fake network as its left network.
  2. Create a route-table object. route_table = RouteTable("my-route-table")
  3. Add a route with prefix=0.0.0.0/0 and next-hop as the service instance name to the route table. route = RouteType(prefix="0.0.0.0/0", next_hop="default-domain:default-project:nat-instance1") route_table.set_routes(RouteTableType(route))
  4. Attach the route table to the network you want to attach to vn.set_route_table(route_table)

Note:

  1. You can provide any prefix instead of "0.0.0.0/0".
  2. You can use the same RouteTable object to connect any number of networks.
Clone this wiki locally