Skip to content

Commit

Permalink
add-support-for-ad-authen (#45)
Browse files Browse the repository at this point in the history
Add support for AD Authentication

Signed-off-by: Kyle Nguyen <nvietthu@gmail.com>
  • Loading branch information
kylewin authored Nov 20, 2024
1 parent cff1339 commit acabc4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 1 addition & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
saml_provider_arn = var.saml_arn
self_service_saml_provider_arn = var.self_saml_arn
root_certificate_chain_arn = join("", aws_acm_certificate.root[*].arn)
active_directory_id = var.authentication_type == "directory-service-authentication" ? var.active_directory_id : null
}

connection_log_options {
Expand All @@ -187,11 +188,6 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
}

tags = module.labels.tags
lifecycle {
ignore_changes = [
authentication_options
]
}
}

##-----------------------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ variable "dns_names" {
variable "authentication_type" {
type = string
default = "certificate-authentication"
description = "The type of client authentication to be used. "
description = "The type of client authentication to be used."
}

variable "active_directory_id" {
type = string
default = ""
description = "The ID of AWS AD to be used with directory-service-authentication authentication type."
}

variable "saml_arn" {
Expand Down

0 comments on commit acabc4c

Please sign in to comment.