cloudposse / terraform-aws-vpn-connection

Terraform module to provision a site-to-site VPN connection between a VPC and an on-premises network
https://cloudposse.com/accelerate
Apache License 2.0
61 stars 58 forks source link

Add transit_gateway_id support to the module to allows multiple VPCs via single site-to-site vpn #28

Closed matharoo closed 1 year ago

matharoo commented 1 year ago

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

Slack Community

Describe the Feature

Allow passing in the transit_gateway_id to the module so that we can allow traffic to and through multiple VPCs with single site-to-site vpn.

Expected Behavior

Allow traffic to flow through to multiple VPCs without the need to setup multiple site-to-site vpns for each vpc because every vpn gateway only is attached to single vpc.

Use Case

Currently we cannot setup a VPN with transit gateway id, we can only setup with vpn virtual private gateway which is only attached to one 1 VPC. If we allow transit_gateway_id to be set then we can allow traffic to multiple vpcs via site-to-site vpn because its possible to attach multiple vpcs to single transit gateway.

Describe Ideal Solution

We can allow passing in just transit_gateway_id and let user setup transit-gateway outside of the module using the https://github.com/cloudposse/terraform-aws-transit-gateway

Alternatives Considered

Explain what alternative solutions or features you've considered.

Additional Context

In the resource "aws_vpn_connection" transit_gateway_id - (Optional) The ID of the EC2 Transit Gateway.