<- All Blueprints
Create a template that deploys...

AWS Route Table

This blueprint creates an AWS Route Table associated with a specified VPC. It allows users to define multiple routes using section tags, adhering to best practices by encouraging the use of tagging for resource identification and management. The blueprint is organized into groups to assist users, including those who may not be cloud infrastructure experts, in configuring essential settings and routes easily.

Template code
Automatically generated UI

---
constants:
  __name: "{{ name }}_{{ __guid }}"
variables:
  name:
    desc: "Name of the route table."
    required: true
    group: Route Table Details
  vpc_id:
    desc: "VPC ID to associate with the route table."
    required: true
    group: Route Table Details
    links_to: resource.aws_vpc.id
  routes:
    group: Routes
    required: false
  tags:
    group: Tags
    required: false
groups:
  Route Table Details:
    order: 1
    desc: "Basic details for the route table."
  Routes:
    order: 2
    desc: "Define routes for the route table."
  Tags:
    order: 3
    desc: "Tags to assign to the route table."
---

resource "aws_route_table" "__name" {
  vpc_id = {{ vpc_id }}

  {{# routes }}
  route {
    cidr_block                = {{ routes.cidr_block | desc: "Destination IPv4 CIDR block." | required: false }}
    ipv6_cidr_block           = {{ routes.ipv6_cidr_block | desc: "Destination IPv6 CIDR block." | required: false }}
    egress_only_gateway_id    = {{ routes.egress_only_gateway_id | desc: "ID of the Egress Only Internet Gateway." | required: false }}
    gateway_id                = {{ routes.gateway_id | desc: "ID of the gateway (Internet Gateway or Virtual Private Gateway)." | required: false }}
    instance_id               = {{ routes.instance_id | desc: "ID of a NAT instance." | required: false }}
    nat_gateway_id            = {{ routes.nat_gateway_id | desc: "ID of a NAT gateway." | required: false }}
    network_interface_id      = {{ routes.network_interface_id | desc: "ID of a network interface." | required: false }}
    transit_gateway_id        = {{ routes.transit_gateway_id | desc: "ID of a transit gateway." | required: false }}
    vpc_peering_connection_id = {{ routes.vpc_peering_connection_id | desc: "ID of a VPC peering connection." | required: false }}
    carrier_gateway_id        = {{ routes.carrier_gateway_id | desc: "ID of a carrier gateway." | required: false }}
    local_gateway_id          = {{ routes.local_gateway_id | desc: "ID of a local gateway." | required: false }}
    destination_prefix_list_id = {{ routes.destination_prefix_list_id | desc: "ID of a prefix list." | required: false }}
  }
  {{/ routes }}

  tags = {
    Name = {{ name }}
    {{# tags }}
      {{ tags.key | required: false }} = {{ tags.value | required: false }}
    {{/ tags }}
  }
}

// By default, the route table has no routes unless specified.
// Tags are encouraged for resource identification and management.
//
What am I looking at?

Talk to a Human

See Resourcely in action and learn how it can help you secure and manage your cloud infrastructure today!