github.com/jpreese/tflint@v0.19.2-0.20200908152133-b01686250fb6/docs/rules/aws_route_not_specified_target.md (about)

     1  # aws_route_not_specified_target
     2  
     3  Disallow routes that have no targets.
     4  
     5  ## Example
     6  
     7  ```hcl
     8  resource "aws_route" "foo" {
     9    route_table_id         = "rtb-1234abcd"
    10    destination_cidr_block = "10.0.1.0/22"
    11  }
    12  ```
    13  
    14  ```
    15  $ tflint
    16  1 issue(s) found:
    17  
    18  Error: The routing target is not specified, each aws_route must contain either egress_only_gateway_id, gateway_id, instance_id, nat_gateway_id, network_interface_id, transit_gateway_id, or vpc_peering_connection_id. (aws_route_not_specified_target)
    19  
    20    on template.tf line 1:
    21     1: resource "aws_route" "foo" {
    22  
    23  Reference: https://github.com/terraform-linters/tflint/blob/v0.11.0/docs/rules/aws_route_not_specified_target.md
    24   
    25  ```
    26  
    27  ## Why
    28  
    29  It results in an error.
    30  
    31  ## How To Fix
    32  
    33  Add a routing target. The [supported arguments](https://www.terraform.io/docs/providers/aws/r/route.html#argument-reference) are: `egress_only_gateway_id`, `gateway_id`, `instance_id`, `nat_gateway_id`, `network_interface_id`, `transit_gateway_id`, `vpc_peering_connection_id`.