Skip to content

Commit 80a5576

Browse files
committed
add description to VPN routes
1 parent 946efb6 commit 80a5576

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

vpn-endpoint.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
99
vpc_id = var.vpc_id
1010

1111
authentication_options {
12-
type = var.authentication_type
13-
root_certificate_chain_arn = var.authentication_type != "certificate-authentication" ? null : aws_acm_certificate.root.arn
14-
saml_provider_arn = var.authentication_saml_provider_arn
15-
self_service_saml_provider_arn = var.enable_self_service_portal == true ? var.self_service_saml_provider_arn : null
16-
active_directory_id = var.active_directory_id
12+
type = var.authentication_type
13+
root_certificate_chain_arn = var.authentication_type != "certificate-authentication" ? null : aws_acm_certificate.root.arn
14+
saml_provider_arn = var.authentication_saml_provider_arn
15+
self_service_saml_provider_arn = var.enable_self_service_portal == true ? var.self_service_saml_provider_arn : null
16+
active_directory_id = var.active_directory_id
1717
}
1818

1919
connection_log_options {
@@ -58,8 +58,9 @@ resource "aws_ec2_client_vpn_authorization_rule" "specific_groups" {
5858

5959

6060
resource "aws_ec2_client_vpn_route" "default" {
61-
count = length(var.subnet_ids) * length(var.allowed_cidr_ranges)
61+
count = length(var.subnet_ids) * length(var.allowed_cidr_ranges)
6262
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.default.id
6363
destination_cidr_block = element(var.allowed_cidr_ranges, count.index)
64-
target_vpc_subnet_id = var.subnet_ids[count.index % length(var.subnet_ids)]
65-
}
64+
target_vpc_subnet_id = var.subnet_ids[count.index % length(var.subnet_ids)]
65+
description = "Route for ${element(var.allowed_cidr_ranges, count.index)} via ${var.subnet_ids[count.index % length(var.subnet_ids)]}"
66+
}

0 commit comments

Comments
 (0)