Data Source: aws_route_tables#
Provides a list of route table IDs matching the specified criteria.
Example usage#
Basic example#
variable vpc_id {}
data "aws_route_tables" "rts" {
vpc_id = var.vpc_id
filter {
name = "tag:kubernetes.io/kops/role"
values = ["private", "public"]
}
}
Argument reference#
filter- (Optional, Block) One or more name/value pairs to use as filters.- Valid values: See supported names and values in EC2 API documentation
tags- (Optional, Map of strings) Key-value pairs. Must exactly match pairs on the required resources.vpc_id- (Optional, String) The VPC ID for filtering the route tables related to this VPC.
filter#
name- (Required, String) The name of the filter.- Constraints: Filter names are case-sensitive
values- (Required, List of strings) One or more filter values.- Constraints: Filter values are case-sensitive
Attribute reference#
id- (String) The region.- Example:
ru-spb
- Example:
ids- (List of strings) The list of all the route table IDs found.