Commit de5fc660 authored by Anton Babenko's avatar Anton Babenko Committed by GitHub

Added amazon_side_asn to vpn_gateway (#159)

* Added amazon_side_asn to vpn_gateway

* change to Amazon default ASN (as per API) (#176)

https://docs.aws.amazon.com/cli/latest/reference/ec2/create-vpn-gateway.html
parent 68e84efc
...@@ -167,6 +167,7 @@ Terraform version 0.10.3 or newer is required for this module to work. ...@@ -167,6 +167,7 @@ Terraform version 0.10.3 or newer is required for this module to work.
| Name | Description | Type | Default | Required | | 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 | | 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 | `<list>` | no | | azs | A list of availability zones in the region | string | `<list>` | 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 | | 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 |
......
...@@ -433,6 +433,7 @@ resource "aws_vpn_gateway" "this" { ...@@ -433,6 +433,7 @@ resource "aws_vpn_gateway" "this" {
count = "${var.create_vpc && var.enable_vpn_gateway ? 1 : 0}" 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)}" tags = "${merge(map("Name", format("%s", var.name)), var.tags, var.vpn_gateway_tags)}"
} }
......
...@@ -173,6 +173,11 @@ variable "vpn_gateway_id" { ...@@ -173,6 +173,11 @@ variable "vpn_gateway_id" {
default = "" 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" { variable "propagate_private_route_tables_vgw" {
description = "Should be true if you want route table propagation" description = "Should be true if you want route table propagation"
default = false default = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment