+ route_table_id = aws_route_table.arvados_subnet_rt.id
+}
+
+#
+# Internet access for Private IP instances
+#
+resource "aws_eip" "compute_nat_gw_eip" {
+ depends_on = [
+ aws_internet_gateway.arvados_gw
+ ]
+}
+resource "aws_nat_gateway" "compute_nat_gw" {
+ # A NAT gateway should be placed on a subnet with an internet gateway
+ subnet_id = aws_subnet.arvados_subnet.id
+ allocation_id = aws_eip.compute_nat_gw_eip.id
+}
+resource "aws_route_table" "compute_subnet_rt" {
+ vpc_id = aws_vpc.arvados_vpc.id
+ route {
+ cidr_block = "0.0.0.0/0"
+ nat_gateway_id = aws_nat_gateway.compute_nat_gw.id
+ }