inspec/test/integration/aws/default/build/route_table.tf
Matthew Dromazos c04a98c9f8 New Skeletal Resource aws_route_tables (#2643)
* Initial commit of skeletal resource aws_route_tables
* Fixes issues with documentation
* Renames route table terraform resources to be more conventional
* Removes tags terraform resources
* Changes aws_route_table and aws_route_tables integration tests to use new terraform names
* Removes unneeded data given in unit tests

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-04-05 12:51:22 -04:00

53 lines
1.2 KiB
HCL

#===========================================================================#
# Route Tables
#===========================================================================#
data "aws_internet_gateway" "default" {
filter {
name = "attachment.vpc-id"
values = ["${data.aws_vpc.default.id}"]
}
}
resource "aws_route_table" "rtb" {
vpc_id = "${data.aws_vpc.default.id}"
route {
cidr_block = "172.32.1.0/24"
gateway_id = "${data.aws_internet_gateway.default.id}"
}
}
resource "aws_route_table" "rtb2" {
vpc_id = "${data.aws_vpc.default.id}"
route {
cidr_block = "172.32.1.0/24"
gateway_id = "${data.aws_internet_gateway.default.id}"
}
}
output "route_table_1_id" {
value = "${aws_route_table.rtb.id}"
}
output "route_table_2_id" {
value = "${aws_route_table.rtb2.id}"
}
output "route_table_1_associations" {
value = "${aws_route_table.rtb.associations}"
}
output "route_table_1_propagating_vgws" {
value = "${aws_route_table.rtb.propagating_vgws}"
}
output "route_table_1_routes" {
value = "${aws_route_table.rtb.routes}"
}
output "route_table_1_vpc_id" {
value = "${aws_route_table.rtb.vpc_id}"
}