github.com/wata727/tflint@v0.12.2-0.20191013070026-96dd0d36f385/docs/rules/aws_route_specified_multiple_targets.md (about)

     1  # aws_route_specified_muletiple_targets
     2  
     3  Disallow routes that have multiple 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    gateway_id             = "igw-1234abcd"
    12    egress_only_gateway_id = "eigw-1234abcd" # second routing target?
    13  }
    14  ```
    15  
    16  ```
    17  $ tflint
    18  1 issue(s) found:
    19  
    20  Error: More than one routing target specified. It must be one. (aws_route_specified_multiple_targets)
    21  
    22    on template.tf line 1:
    23     1: resource "aws_route" "foo" {
    24  
    25  Reference: https://github.com/wata727/tflint/blob/v0.11.0/docs/rules/aws_route_specified_multiple_targets.md
    26   
    27  ```
    28  
    29  ## Why
    30  
    31  It occurs an error.
    32  
    33  ## How To Fix
    34  
    35  Check if two or more of the following attributes are specified:
    36  
    37  - gateway_id
    38  - egress_only_gateway_id
    39  - nat_gateway_id
    40  - instance_id
    41  - vpc_peering_connection_id
    42  - network_interface_id
    43  - transit_gateway_id