18 lines
407 B
Terraform
18 lines
407 B
Terraform
resource "aws_route_table" "this" {
|
|
vpc_id = var.vpc-id
|
|
tags = {
|
|
Name = "${var.resource-prefix}-private"
|
|
}
|
|
}
|
|
|
|
resource "aws_route" "this" {
|
|
destination_cidr_block = "0.0.0.0/0"
|
|
nat_gateway_id = var.ngw-id
|
|
route_table_id = aws_route_table.this.id
|
|
}
|
|
|
|
resource "aws_route_table_association" "this" {
|
|
route_table_id = aws_route_table.this.id
|
|
subnet_id = var.subnet-id
|
|
}
|