feat: adding custom routes for AWS

This commit is contained in:
Pierre Mavro
2021-12-23 12:31:13 +01:00
committed by Pierre Mavro
parent 3d3100d7e5
commit b4402cf03b
4 changed files with 25 additions and 0 deletions

View File

@@ -87,6 +87,13 @@ resource "aws_route_table" "eks_cluster" {
gateway_id = aws_internet_gateway.eks_cluster.id
}
{% for route in vpc_custom_routing_table %}
route {
cidr_block = "{{ route.destination }}"
gateway_id = "{{ route.target }}"
}
{% endfor %}
tags = local.tags_eks_vpc_public
}

View File

@@ -41,6 +41,14 @@ resource "aws_route_table" "eks_cluster" {
gateway_id = aws_internet_gateway.eks_cluster.id
}
// todo(pmavro): add tests for it when it will be available in the SDK
{% for route in vpc_custom_routing_table %}
route {
cidr_block = "{{ route.destination }}"
gateway_id = "{{ route.target }}"
}
{% endfor %}
tags = local.tags_eks_vpc
}