diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6cd369..b348aea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.96.1 + rev: v1.96.2 hooks: - id: terraform_fmt - id: terraform_docs diff --git a/README.md b/README.md index d35fad1..68a9d83 100644 --- a/README.md +++ b/README.md @@ -243,14 +243,14 @@ module "tgw" { | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules @@ -325,6 +325,7 @@ No modules. | [vpc\_id](#input\_vpc\_id) | The id of the VPC where the VPN Gateway lives. | `string` | `null` | no | | [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 | | [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 | +| [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 | | [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 | | [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 | | [vpn\_gateway\_id](#input\_vpn\_gateway\_id) | The id of the VPN Gateway. | `string` | `null` | no | diff --git a/examples/complete-dual-vpn-gateway/README.md b/examples/complete-dual-vpn-gateway/README.md index a1292d5..b013458 100644 --- a/examples/complete-dual-vpn-gateway/README.md +++ b/examples/complete-dual-vpn-gateway/README.md @@ -26,14 +26,14 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules diff --git a/examples/complete-dual-vpn-gateway/versions.tf b/examples/complete-dual-vpn-gateway/versions.tf index fd4d116..14b6dc8 100644 --- a/examples/complete-dual-vpn-gateway/versions.tf +++ b/examples/complete-dual-vpn-gateway/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } } diff --git a/examples/complete-vpn-connection-transit-gateway/README.md b/examples/complete-vpn-connection-transit-gateway/README.md index 92a00de..41f3b96 100644 --- a/examples/complete-vpn-connection-transit-gateway/README.md +++ b/examples/complete-vpn-connection-transit-gateway/README.md @@ -19,14 +19,14 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules diff --git a/examples/complete-vpn-connection-transit-gateway/main.tf b/examples/complete-vpn-connection-transit-gateway/main.tf index 03c0904..7221d0c 100644 --- a/examples/complete-vpn-connection-transit-gateway/main.tf +++ b/examples/complete-vpn-connection-transit-gateway/main.tf @@ -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" @@ -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" diff --git a/examples/complete-vpn-connection-transit-gateway/versions.tf b/examples/complete-vpn-connection-transit-gateway/versions.tf index fd4d116..14b6dc8 100644 --- a/examples/complete-vpn-connection-transit-gateway/versions.tf +++ b/examples/complete-vpn-connection-transit-gateway/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } } diff --git a/examples/complete-vpn-gateway-with-static-routes/README.md b/examples/complete-vpn-gateway-with-static-routes/README.md index 085444f..e79b196 100644 --- a/examples/complete-vpn-gateway-with-static-routes/README.md +++ b/examples/complete-vpn-gateway-with-static-routes/README.md @@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules diff --git a/examples/complete-vpn-gateway-with-static-routes/versions.tf b/examples/complete-vpn-gateway-with-static-routes/versions.tf index fd4d116..14b6dc8 100644 --- a/examples/complete-vpn-gateway-with-static-routes/versions.tf +++ b/examples/complete-vpn-gateway-with-static-routes/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } } diff --git a/examples/complete-vpn-gateway/README.md b/examples/complete-vpn-gateway/README.md index 37cff11..b0b0c9e 100644 --- a/examples/complete-vpn-gateway/README.md +++ b/examples/complete-vpn-gateway/README.md @@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules diff --git a/examples/complete-vpn-gateway/versions.tf b/examples/complete-vpn-gateway/versions.tf index fd4d116..14b6dc8 100644 --- a/examples/complete-vpn-gateway/versions.tf +++ b/examples/complete-vpn-gateway/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } } diff --git a/examples/minimal-vpn-gateway/README.md b/examples/minimal-vpn-gateway/README.md index 397d90d..7520b54 100644 --- a/examples/minimal-vpn-gateway/README.md +++ b/examples/minimal-vpn-gateway/README.md @@ -21,14 +21,14 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 4.66 | +| [terraform](#requirement\_terraform) | >= 1.3 | +| [aws](#requirement\_aws) | >= 5.42 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 4.66 | +| [aws](#provider\_aws) | >= 5.42 | ## Modules diff --git a/examples/minimal-vpn-gateway/versions.tf b/examples/minimal-vpn-gateway/versions.tf index fd4d116..14b6dc8 100644 --- a/examples/minimal-vpn-gateway/versions.tf +++ b/examples/minimal-vpn-gateway/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } } diff --git a/main.tf b/main.tf index e8f809a..f2e2f60 100644 --- a/main.tf +++ b/main.tf @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/variables.tf b/variables.tf index 01f7cbc..693f132 100644 --- a/variables.tf +++ b/variables.tf @@ -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 = null +} + 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) diff --git a/versions.tf b/versions.tf index fd4d116..14b6dc8 100644 --- a/versions.tf +++ b/versions.tf @@ -1,10 +1,10 @@ terraform { - required_version = ">= 1.0" + required_version = ">= 1.3" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4.66" + version = ">= 5.42" } } }