Skip to content

Commit 19c0b24

Browse files
committed
Added amazon_side_asn to vpn_gateway
1 parent 553d76a commit 19c0b24

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Terraform version 0.10.3 or newer is required for this module to work.
163163

164164
| Name | Description | Type | Default | Required |
165165
|------|-------------|:----:|:-----:|:-----:|
166+
| 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 |
166167
| 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 |
167168
| azs | A list of availability zones in the region | string | `<list>` | no |
168169
| 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 |

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ resource "aws_route_table_association" "public" {
421421
resource "aws_vpn_gateway" "this" {
422422
count = "${var.create_vpc && var.enable_vpn_gateway ? 1 : 0}"
423423

424-
vpc_id = "${aws_vpc.this.id}"
424+
vpc_id = "${aws_vpc.this.id}"
425+
amazon_side_asn = "${var.amazon_side_asn}"
425426

426427
tags = "${merge(map("Name", format("%s", var.name)), var.vpn_gateway_tags, var.tags)}"
427428
}

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ variable "vpn_gateway_id" {
143143
default = ""
144144
}
145145

146+
variable "amazon_side_asn" {
147+
description = "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."
148+
default = "" # Error: module.vpc.aws_vpn_gateway.this: "amazon_side_asn" ("") must be a 64-bit integer
149+
}
150+
146151
variable "propagate_private_route_tables_vgw" {
147152
description = "Should be true if you want route table propagation"
148153
default = false

0 commit comments

Comments
 (0)