cloudposse / terraform-aws-ec2-client-vpn

https://cloudposse.com/accelerate
Apache License 2.0
45 stars 28 forks source link

Support tcp transport protocol #44

Closed pratanini closed 1 year ago

pratanini commented 2 years ago

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

Support for configuring vpn transport protocol. Currently, its default which is udp.

Expected Behavior

New configurable variable introduced for transport protocol

Use Case

Sometimes udp is not supported Or doesn't work well with all internet providers.

Describe Ideal Solution

A variable added to variables.tf file

variable "transport_protocol" {
  description = <<-EOT
    One of `udp` or `tcp`
  EOT
  type = string
  default = "udp"
  validation {
    condition     = contains(["udp", "tcp"], var.transport_protocol)
    error_message = "Invalid protocol type must be one of: udp, tcp."
  }
}

Add transport_protocol = var.transport_protocol to https://github.com/cloudposse/terraform-aws-ec2-client-vpn/blob/master/main.tf#L152

Ref: aws_ec2_client_vpn_endpoint

nitrocode commented 2 years ago

@pratanini thanks for the issue!

This would be an easy contribution if you'd like to give it a try. We love extra help because we only have so much time and we're constantly running around.

s1rc commented 1 year ago

@pratanini and @nitrocode I created a PR with the changes here. Tested and works on deployment.