Skip to content

Commit

Permalink
Added amazon_side_asn to vpn_gateway (#159)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
antonbabenko authored Oct 1, 2018
1 parent 68e84ef commit de5fc66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `<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 |
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
}
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de5fc66

Please sign in to comment.