Skip to content

Commit

Permalink
feat: expose dns servers as module variable (#42)
Browse files Browse the repository at this point in the history
Existing variable in `ec2_client_vpn_endpoint` to specify the DNS
servers of the VPN endpoint
  • Loading branch information
pointsevenfive authored Aug 29, 2024
1 parent dba78db commit bb73794
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ resource "aws_ec2_client_vpn_endpoint" "default" {
security_group_ids = concat([aws_security_group.this[0].id], var.security_group_ids)
vpn_port = var.vpn_port
self_service_portal = var.self_service_portal
dns_servers = var.dns_servers

authentication_options {
type = var.authentication_type
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,12 @@ variable "enable_security_group" {
default = true
description = "create for security group module this value is enable 'true'"
}

variable "dns_servers" {
type = list(string)
validation {
condition = length(dns_servers) > 2
error_message = "A Client VPN endpoint can have up to two DNS servers"
}
description = "Information about the DNS servers to be used for DNS resolution"
}

0 comments on commit bb73794

Please sign in to comment.