diff --git a/README.md b/README.md index 658f24183..9fbef7d8a 100644 --- a/README.md +++ b/README.md @@ -528,6 +528,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway | vpc\_endpoint\_tags | Additional tags for the VPC Endpoints | `map(string)` | `{}` | no | | vpc\_flow\_log\_tags | Additional tags for the VPC Flow Logs | `map(string)` | `{}` | no | | vpc\_tags | Additional tags for the VPC | `map(string)` | `{}` | no | +| vpn\_gateway\_az | The Availability Zone for the VPN Gateway | `string` | n/a | yes | | vpn\_gateway\_id | ID of VPN Gateway to attach to the VPC | `string` | `""` | no | | vpn\_gateway\_tags | Additional tags for the VPN gateway | `map(string)` | `{}` | no | diff --git a/main.tf b/main.tf index 49a2e0227..34c36ea45 100644 --- a/main.tf +++ b/main.tf @@ -1020,8 +1020,9 @@ resource "aws_customer_gateway" "this" { resource "aws_vpn_gateway" "this" { count = var.create_vpc && var.enable_vpn_gateway ? 1 : 0 - vpc_id = local.vpc_id - amazon_side_asn = var.amazon_side_asn + vpc_id = local.vpc_id + amazon_side_asn = var.amazon_side_asn + availability_zone = var.vpn_gateway_az tags = merge( { diff --git a/variables.tf b/variables.tf index 0d109c0cd..7a5cc4414 100644 --- a/variables.tf +++ b/variables.tf @@ -1327,6 +1327,12 @@ variable "amazon_side_asn" { default = "64512" } +variable "vpn_gateway_az" { + description = "The Availability Zone for the VPN Gateway" + type = string + default = null +} + variable "propagate_private_route_tables_vgw" { description = "Should be true if you want route table propagation" type = bool