-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix vpn connection setup while tunnel cidr is used #11
Fix vpn connection setup while tunnel cidr is used #11
Conversation
@miguelaferreira What do you think about all this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The contribution in this PR is very welcome.
I've made a few comments with proposals for small adjustments to the code, and it looks overall good to me.
I've also tested the PR and got the expected results:
Apply complete! Resources: 46 added, 0 changed, 0 destroyed.
Outputs:
vpn_gateway.vpn_connection_id = vpn-0ed0e25583f2e89ce
vpn_gateway.vpn_connection_tunnel1_address = 34.247.237.2
vpn_gateway.vpn_connection_tunnel1_cgw_inside_address = 169.254.33.90
vpn_gateway.vpn_connection_tunnel1_vgw_inside_address = 169.254.33.89
vpn_gateway.vpn_connection_tunnel2_address = 54.229.206.2
vpn_gateway.vpn_connection_tunnel2_cgw_inside_address = 169.254.33.102
vpn_gateway.vpn_connection_tunnel2_vgw_inside_address = 169.254.33.101
vpn_gateway2.vpn_connection_id = vpn-058bd8b96b511877f
vpn_gateway2.vpn_connection_tunnel1_address = 34.240.59.142
vpn_gateway2.vpn_connection_tunnel1_cgw_inside_address = 169.254.34.102
vpn_gateway2.vpn_connection_tunnel1_vgw_inside_address = 169.254.34.101
vpn_gateway2.vpn_connection_tunnel2_address = 52.18.208.78
vpn_gateway2.vpn_connection_tunnel2_cgw_inside_address = 169.254.34.90
vpn_gateway2.vpn_connection_tunnel2_vgw_inside_address = 169.254.34.89
Thanks
Hi |
Thanks a lot for the effort @ppieprzycki 👍 @antonbabenko LGTM |
You guys ROCK! 🥇 v1.5.0 has been released. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hello,
I'd like to propose two changes
As I tried to use tunnel CIDR in my VPN setup I had a problem with creating an "aws_vpn_resource".
This module tries creating both resources named "default" and "tunnel" for the same IPsec connection.
Fix makes sure that the "Default" resource is not created when any of var.tunnel* variables are set.
The second change introduces new variable named "create_vpn_gateway_attachment".
Idea behind is to not create an association between vGW and VPC within this module
The other module "terraform-aws-vpc" already has logic that is responsible for creating vGW and attaching it to a VPC.
Also, a problem arises when we configure two VPN connections and we want later delete one of them (or we have direct connect). If we delete vgw attachment we cannot further use other connection.
The new variable is set by default to true to provide backward compatibility.