Skip to content

Commit

Permalink
Add support for specifying AZ in VPN Gateway (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 authored Mar 11, 2020
1 parent ee9271e commit dea4664
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dea4664

Please sign in to comment.