Skip to content
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

feat!: Enable acceleration support, raies MSV or Terraform and AWS provider #99

Merged
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ No modules.
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The id of the VPC where the VPN Gateway lives. | `string` | `null` | no |
| <a name="input_vpc_subnet_route_table_count"></a> [vpc\_subnet\_route\_table\_count](#input\_vpc\_subnet\_route\_table\_count) | The number of subnet route table ids being passed in via `vpc_subnet_route_table_ids`. | `number` | `0` | no |
| <a name="input_vpc_subnet_route_table_ids"></a> [vpc\_subnet\_route\_table\_ids](#input\_vpc\_subnet\_route\_table\_ids) | The ids of the VPC subnets for which routes from the VPN Gateway will be propagated. | `list(string)` | `[]` | no |
| <a name="input_vpn_connection_enable_acceleration"></a> [vpn\_connection\_enable\_acceleration](#input\_vpn\_connection\_enable\_acceleration) | Indicate whether to enable acceleration for the VPN connection. Supports only EC2 Transit Gateway. | `bool` | `false` | no |
| <a name="input_vpn_connection_static_routes_destinations"></a> [vpn\_connection\_static\_routes\_destinations](#input\_vpn\_connection\_static\_routes\_destinations) | List of CIDRs to be used as destination for static routes (used with `vpn_connection_static_routes_only = true`). Routes to destinations set here will be propagated to the routing tables of the subnets defined in `vpc_subnet_route_table_ids`. | `list(string)` | `[]` | no |
| <a name="input_vpn_connection_static_routes_only"></a> [vpn\_connection\_static\_routes\_only](#input\_vpn\_connection\_static\_routes\_only) | Set to true for the created VPN connection to use static routes exclusively (only if `create_vpn_connection = true`). Static routes must be used for devices that don't support BGP. | `bool` | `false` | no |
| <a name="input_vpn_gateway_id"></a> [vpn\_gateway\_id](#input\_vpn\_gateway\_id) | The id of the VPN Gateway. | `string` | `null` | no |
Expand Down
10 changes: 6 additions & 4 deletions examples/complete-vpn-connection-transit-gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ module "vpn_gateway_1" {
tunnel1_preshared_key = "1234567890abcdefghijklmn"
tunnel2_preshared_key = "abcdefghijklmn1234567890"

create_vpn_gateway_attachment = false
connect_to_transit_gateway = true
create_vpn_gateway_attachment = false
connect_to_transit_gateway = true
vpn_connection_enable_acceleration = true

tags = {
key1 = "example value 1"
Expand All @@ -41,8 +42,9 @@ module "vpn_gateway_2" {
tunnel1_preshared_key = "1234567890abcdefghijklmn"
tunnel2_preshared_key = "abcdefghijklmn1234567890"

create_vpn_gateway_attachment = false
connect_to_transit_gateway = true
create_vpn_gateway_attachment = false
connect_to_transit_gateway = true
vpn_connection_enable_acceleration = true

tags = {
vpn2a = "example value 1"
Expand Down
12 changes: 8 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ resource "aws_vpn_connection" "default" {
customer_gateway_id = var.customer_gateway_id
type = "ipsec.1"

static_routes_only = var.vpn_connection_static_routes_only
static_routes_only = var.vpn_connection_static_routes_only
enable_acceleration = var.vpn_connection_enable_acceleration

tunnel1_phase1_dh_group_numbers = var.tunnel1_phase1_dh_group_numbers
tunnel2_phase1_dh_group_numbers = var.tunnel2_phase1_dh_group_numbers
Expand Down Expand Up @@ -132,7 +133,8 @@ resource "aws_vpn_connection" "tunnel" {
customer_gateway_id = var.customer_gateway_id
type = "ipsec.1"

static_routes_only = var.vpn_connection_static_routes_only
static_routes_only = var.vpn_connection_static_routes_only
enable_acceleration = var.vpn_connection_enable_acceleration

tunnel1_inside_cidr = var.tunnel1_inside_cidr
tunnel2_inside_cidr = var.tunnel2_inside_cidr
Expand Down Expand Up @@ -243,7 +245,8 @@ resource "aws_vpn_connection" "preshared" {
customer_gateway_id = var.customer_gateway_id
type = "ipsec.1"

static_routes_only = var.vpn_connection_static_routes_only
static_routes_only = var.vpn_connection_static_routes_only
enable_acceleration = var.vpn_connection_enable_acceleration

tunnel1_preshared_key = var.tunnel1_preshared_key
tunnel2_preshared_key = var.tunnel2_preshared_key
Expand Down Expand Up @@ -351,7 +354,8 @@ resource "aws_vpn_connection" "tunnel_preshared" {
customer_gateway_id = var.customer_gateway_id
type = "ipsec.1"

static_routes_only = var.vpn_connection_static_routes_only
static_routes_only = var.vpn_connection_static_routes_only
enable_acceleration = var.vpn_connection_enable_acceleration

tunnel1_inside_cidr = var.tunnel1_inside_cidr
tunnel2_inside_cidr = var.tunnel2_inside_cidr
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ variable "vpn_connection_static_routes_only" {
default = false
}

variable "vpn_connection_enable_acceleration" {
description = "Indicate whether to enable acceleration for the VPN connection. Supports only EC2 Transit Gateway."
type = bool
default = false
james-martinez marked this conversation as resolved.
Show resolved Hide resolved
}

variable "vpn_connection_static_routes_destinations" {
description = "List of CIDRs to be used as destination for static routes (used with `vpn_connection_static_routes_only = true`). Routes to destinations set here will be propagated to the routing tables of the subnets defined in `vpc_subnet_route_table_ids`."
type = list(string)
Expand Down