Skip to content

Commit 4f7c4d2

Browse files
feat!: Enable acceleration support, raies MSV or Terraform and AWS provider (#99)
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
1 parent 139920a commit 4f7c4d2

File tree

16 files changed

+52
-39
lines changed

16 files changed

+52
-39
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.96.1
3+
rev: v1.96.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ module "tgw" {
243243

244244
| Name | Version |
245245
|------|---------|
246-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
247-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
246+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
247+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
248248

249249
## Providers
250250

251251
| Name | Version |
252252
|------|---------|
253-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
253+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
254254

255255
## Modules
256256

@@ -325,6 +325,7 @@ No modules.
325325
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The id of the VPC where the VPN Gateway lives. | `string` | `null` | no |
326326
| <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 |
327327
| <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 |
328+
| <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` | `null` | no |
328329
| <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 |
329330
| <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 |
330331
| <a name="input_vpn_gateway_id"></a> [vpn\_gateway\_id](#input\_vpn\_gateway\_id) | The id of the VPN Gateway. | `string` | `null` | no |

examples/complete-dual-vpn-gateway/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Run `terraform destroy` when you don't need these resources.
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
30-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
29+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
30+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
3131

3232
## Providers
3333

3434
| Name | Version |
3535
|------|---------|
36-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
36+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
3737

3838
## Modules
3939

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

examples/complete-vpn-connection-transit-gateway/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Run `terraform destroy` when you don't need these resources.
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
3030

3131
## Modules
3232

examples/complete-vpn-connection-transit-gateway/main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ module "vpn_gateway_1" {
1717
tunnel1_preshared_key = "1234567890abcdefghijklmn"
1818
tunnel2_preshared_key = "abcdefghijklmn1234567890"
1919

20-
create_vpn_gateway_attachment = false
21-
connect_to_transit_gateway = true
20+
create_vpn_gateway_attachment = false
21+
connect_to_transit_gateway = true
22+
vpn_connection_enable_acceleration = true
2223

2324
tags = {
2425
key1 = "example value 1"
@@ -41,8 +42,9 @@ module "vpn_gateway_2" {
4142
tunnel1_preshared_key = "1234567890abcdefghijklmn"
4243
tunnel2_preshared_key = "abcdefghijklmn1234567890"
4344

44-
create_vpn_gateway_attachment = false
45-
connect_to_transit_gateway = true
45+
create_vpn_gateway_attachment = false
46+
connect_to_transit_gateway = true
47+
vpn_connection_enable_acceleration = true
4648

4749
tags = {
4850
vpn2a = "example value 1"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

examples/complete-vpn-gateway-with-static-routes/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources.
2121

2222
| Name | Version |
2323
|------|---------|
24-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
24+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
3232

3333
## Modules
3434

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

examples/complete-vpn-gateway/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources.
2121

2222
| Name | Version |
2323
|------|---------|
24-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
24+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
3232

3333
## Modules
3434

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

examples/minimal-vpn-gateway/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources.
2121

2222
| Name | Version |
2323
|------|---------|
24-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.66 |
24+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.42 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.66 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.42 |
3232

3333
## Modules
3434

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

main.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ resource "aws_vpn_connection" "default" {
2424
customer_gateway_id = var.customer_gateway_id
2525
type = "ipsec.1"
2626

27-
static_routes_only = var.vpn_connection_static_routes_only
27+
static_routes_only = var.vpn_connection_static_routes_only
28+
enable_acceleration = var.vpn_connection_enable_acceleration
2829

2930
tunnel1_phase1_dh_group_numbers = var.tunnel1_phase1_dh_group_numbers
3031
tunnel2_phase1_dh_group_numbers = var.tunnel2_phase1_dh_group_numbers
@@ -132,7 +133,8 @@ resource "aws_vpn_connection" "tunnel" {
132133
customer_gateway_id = var.customer_gateway_id
133134
type = "ipsec.1"
134135

135-
static_routes_only = var.vpn_connection_static_routes_only
136+
static_routes_only = var.vpn_connection_static_routes_only
137+
enable_acceleration = var.vpn_connection_enable_acceleration
136138

137139
tunnel1_inside_cidr = var.tunnel1_inside_cidr
138140
tunnel2_inside_cidr = var.tunnel2_inside_cidr
@@ -243,7 +245,8 @@ resource "aws_vpn_connection" "preshared" {
243245
customer_gateway_id = var.customer_gateway_id
244246
type = "ipsec.1"
245247

246-
static_routes_only = var.vpn_connection_static_routes_only
248+
static_routes_only = var.vpn_connection_static_routes_only
249+
enable_acceleration = var.vpn_connection_enable_acceleration
247250

248251
tunnel1_preshared_key = var.tunnel1_preshared_key
249252
tunnel2_preshared_key = var.tunnel2_preshared_key
@@ -351,7 +354,8 @@ resource "aws_vpn_connection" "tunnel_preshared" {
351354
customer_gateway_id = var.customer_gateway_id
352355
type = "ipsec.1"
353356

354-
static_routes_only = var.vpn_connection_static_routes_only
357+
static_routes_only = var.vpn_connection_static_routes_only
358+
enable_acceleration = var.vpn_connection_enable_acceleration
355359

356360
tunnel1_inside_cidr = var.tunnel1_inside_cidr
357361
tunnel2_inside_cidr = var.tunnel2_inside_cidr

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ variable "vpn_connection_static_routes_only" {
5353
default = false
5454
}
5555

56+
variable "vpn_connection_enable_acceleration" {
57+
description = "Indicate whether to enable acceleration for the VPN connection. Supports only EC2 Transit Gateway."
58+
type = bool
59+
default = null
60+
}
61+
5662
variable "vpn_connection_static_routes_destinations" {
5763
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`."
5864
type = list(string)

versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.0"
2+
required_version = ">= 1.3"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.66"
7+
version = ">= 5.42"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)