DNXLabs / terraform-aws-client-vpn

This terraform module installs a client VPN.
https://modules.dnx.one
Apache License 2.0
48 stars 54 forks source link

VPC ID required along with Security Group ID #25

Closed adeelamin15 closed 1 year ago

adeelamin15 commented 1 year ago

Contact Details (optional)

No response

Description. What happened?

Unable to spin up any client VPN with latest 0.5.0 release. That is because security group ID is supplied in AWS Client VPN resource without specifying VPC ID.

Workaround is to switch to old release 0.4.2

Steps to reproduce

module "client-vpn" {
  source  = "DNXLabs/client-vpn/aws"
  version = "0.5.0"
  cidr = "10.0.0.0/16"
  name = "MyVPN"
  subnet_ids = ["subnet-xxxx", "subnet-xxxx"]
  vpc_id = ""vpc-xxxxx"
}

Expected behavior

No response

Actual behavior

Client VPN should be created seemlessly.

Occurrence

Frequently

Relevant log output

module.vpn.module.vpn.aws_ec2_client_vpn_endpoint.default: Creating...
╷
│ Error: creating EC2 Client VPN Endpoint: InvalidParameterValue: Security Groups cannot be specified without a VPC ID
│       status code: 400, request id: a41f5e01-9b20-430c-9974-b1c82365f182
│ 
│   with module.vpn.module.vpn.aws_ec2_client_vpn_endpoint.default,
│   on .terraform/modules/vpn.vpn/vpn-endpoint.tf line 1, in resource "aws_ec2_client_vpn_endpoint" "default":
│    1: resource "aws_ec2_client_vpn_endpoint" "default" {
│ 
╵

Code of Conduct

adeelamin15 commented 1 year ago

@mcosta1105 Created PR https://github.com/DNXLabs/terraform-aws-client-vpn/pull/26

adeelamin15 commented 1 year ago

REsolved with mentioned PR