Skip to content

Commit

Permalink
Added options for managing connection authorization for new client co…
Browse files Browse the repository at this point in the history
…nnections
  • Loading branch information
Alexandre Mont'Alvao committed Mar 6, 2024
1 parent ab1ab16 commit 0770111
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,14 @@ variable "enable_self_service_portal" {
default = false
description = "Specify whether to enable the self-service portal for the Client VPN endpoint"
}

variable "client_connect_options" {
type = bool
default = false
description = "Indicates whether client connect options are enabled"
}

variable "connection_authorization_lambda_function_arn" {
default = null
description = "The Amazon Resource Name (ARN) of the Lambda function used for connection authorization."
}
5 changes: 5 additions & 0 deletions vpn-endpoint.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
cloudwatch_log_stream = aws_cloudwatch_log_stream.vpn.name
}

client_connect_options {
enabled = var.client_connect_options
lambda_function_arn = var.client_connect_options != true ? null : var.connection_authorization_lambda_function_arn
}

tags = merge(
var.tags,
tomap({
Expand Down

0 comments on commit 0770111

Please sign in to comment.