Carina

Resource

aws.ec2.Route

Describes a route in a route table.

Example

let vpc = aws.ec2.Vpc {
  cidr_block = '10.0.0.0/16'

  tags = {
    Environment = 'example'
  }
}

let igw = aws.ec2.InternetGateway {
  vpc_id = vpc.vpc_id

  tags = {
    Environment = 'example'
  }
}

let rt = aws.ec2.RouteTable {
  vpc_id = vpc.vpc_id

  tags = {
    Environment = 'example'
  }
}

aws.ec2.Route {
  route_table_id         = rt.route_table_id
  destination_cidr_block = '0.0.0.0/0'
  gateway_id             = igw.internet_gateway_id
}

Argument Reference

destination_cidr_block

The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

gateway_id

The ID of an internet gateway or virtual private gateway attached to your VPC.

nat_gateway_id

[IPv4 traffic only] The ID of a NAT gateway.

route_table_id

The ID of the route table for the route.

Union Definitions

gateway_id union