diff --git a/README.md b/README.md index f9313e9b5..aca1b82f6 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ Terraform version 0.10.3 or newer is required for this module to work. | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| amazon_side_asn | The Autonomous System Number (ASN) for the Amazon side of the gateway. If you don't specify an ASN, the virtual private gateway is created with the default ASN. | string | `` | no | | assign_generated_ipv6_cidr_block | Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block | string | `false` | no | | azs | A list of availability zones in the region | string | `` | no | | cidr | The CIDR block for the VPC. Default value is a valid CIDR, but not acceptable by AWS and should be overridden | string | `0.0.0.0/0` | no | diff --git a/main.tf b/main.tf index 604945b2c..5a8461042 100644 --- a/main.tf +++ b/main.tf @@ -432,7 +432,8 @@ resource "aws_route_table_association" "public" { resource "aws_vpn_gateway" "this" { count = "${var.create_vpc && var.enable_vpn_gateway ? 1 : 0}" - vpc_id = "${local.vpc_id}" + vpc_id = "${local.vpc_id}" + amazon_side_asn = "${var.amazon_side_asn}" tags = "${merge(map("Name", format("%s", var.name)), var.tags, var.vpn_gateway_tags)}" } diff --git a/variables.tf b/variables.tf index 7b1e6ae16..13af9383f 100644 --- a/variables.tf +++ b/variables.tf @@ -173,6 +173,11 @@ variable "vpn_gateway_id" { default = "" } +variable "amazon_side_asn" { + description = "The Autonomous System Number (ASN) for the Amazon side of the gateway. By default the virtual private gateway is created with the current default Amazon ASN." + default = "64512" +} + variable "propagate_private_route_tables_vgw" { description = "Should be true if you want route table propagation" default = false