Skip to content

Commit

Permalink
add enable_acceleration support
Browse files Browse the repository at this point in the history
  • Loading branch information
james-martinez committed Aug 14, 2024
1 parent 844b512 commit fc81632
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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 @@ -133,6 +134,7 @@ resource "aws_vpn_connection" "tunnel" {
type = "ipsec.1"

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 @@ -244,6 +246,7 @@ resource "aws_vpn_connection" "preshared" {
type = "ipsec.1"

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 @@ -352,6 +355,7 @@ resource "aws_vpn_connection" "tunnel_preshared" {
type = "ipsec.1"

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
}

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

0 comments on commit fc81632

Please sign in to comment.