Skip to content

Commit

Permalink
add aws_ec2_client_vpn_route
Browse files Browse the repository at this point in the history
  • Loading branch information
renato-dnx committed Nov 16, 2023
1 parent ab1ab16 commit ac8fcf6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vpn-endpoint.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ resource "aws_ec2_client_vpn_authorization_rule" "specific_groups" {
target_network_cidr = element(var.allowed_cidr_ranges, count.index)
access_group_id = var.allowed_access_groups[count.index % length(var.allowed_cidr_ranges)]
}


resource "aws_ec2_client_vpn_route" "default" {
count = length(var.subnet_ids) * length(var.allowed_cidr_ranges)
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.default.id
destination_cidr_block = element(var.allowed_cidr_ranges, count.index)
target_vpc_subnet_id = var.subnet_ids[count.index % length(var.subnet_ids)]
}

0 comments on commit ac8fcf6

Please sign in to comment.