Skip to content

Enable classiclink everywhere #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ To that end, it is possible to assign existing IPs to the NAT Gateways.
This prevents the destruction of the VPC from releasing those IPs, while making it possible that a re-created VPC uses the same IPs.

To achieve this, allocate the IPs outside the VPC module declaration.

```hcl
resource "aws_eip" "nat" {
count = 3
Expand All @@ -61,6 +62,7 @@ resource "aws_eip" "nat" {
```

Then, pass the allocated IPs as a parameter to this module.

```hcl
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
Expand All @@ -83,17 +85,17 @@ Passing the IPs into the module is done by setting two variables `reuse_nat_ips
This module supports three scenarios for creating NAT gateways. Each will be explained in further detail in the corresponding sections.

* One NAT Gateway per subnet (default behavior)
* `enable_nat_gateway = true`
* `single_nat_gateway = false`
* `one_nat_gateway_per_az = false`
* `enable_nat_gateway = true`
* `single_nat_gateway = false`
* `one_nat_gateway_per_az = false`
* Single NAT Gateway
* `enable_nat_gateway = true`
* `single_nat_gateway = true`
* `one_nat_gateway_per_az = false`
* `enable_nat_gateway = true`
* `single_nat_gateway = true`
* `one_nat_gateway_per_az = false`
* One NAT Gateway per availability zone
* `enable_nat_gateway = true`
* `single_nat_gateway = false`
* `one_nat_gateway_per_az = true`
* `enable_nat_gateway = true`
* `single_nat_gateway = false`
* `one_nat_gateway_per_az = true`

If both `single_nat_gateway` and `one_nat_gateway_per_az` are set to `true`, then `single_nat_gateway` takes precedence.

Expand Down Expand Up @@ -189,6 +191,7 @@ Terraform version 0.10.3 or newer is required for this module to work.
| elasticache_route_table_tags | Additional tags for the elasticache route tables | string | `<map>` | no |
| elasticache_subnet_tags | Additional tags for the elasticache subnets | string | `<map>` | no |
| elasticache_subnets | A list of elasticache subnets | list | `<list>` | no |
| enable_classiclink | Should be true to enable ClassicLink in the created VPC | string | `false` | no |
| enable_dhcp_options | Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type | string | `false` | no |
| enable_dns_hostnames | Should be true to enable DNS hostnames in the VPC | string | `false` | no |
| enable_dns_support | Should be true to enable DNS support in the VPC | string | `true` | no |
Expand Down Expand Up @@ -289,13 +292,14 @@ Terraform version 0.10.3 or newer is required for this module to work.

This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tests through test kitchen. To run them:

1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-vpc/tree/master/Gemfile).
2. Install bundler and the gems from our Gemfile:
1. Install [rvm](https://rvm.io/rvm/install) and the ruby version specified in the [Gemfile](https://github.com/terraform-aws-modules/terraform-aws-vpc/tree/master/Gemfile).
2. Install bundler and the gems from our Gemfile:

```
gem install bundler; bundle install
```
3. Test using `bundle exec kitchen test` from the root of the repo.

3. Test using `bundle exec kitchen test` from the root of the repo.

## Authors

Expand All @@ -304,4 +308,3 @@ Module is maintained by [Anton Babenko](https://github.com/antonbabenko) with he
## License

Apache 2 Licensed. See LICENSE for full details.

1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ resource "aws_vpc" "this" {
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
assign_generated_ipv6_cidr_block = "${var.assign_generated_ipv6_cidr_block}"
enable_classiclink = "${var.enable_classiclink}"

tags = "${merge(map("Name", format("%s", var.name)), var.vpc_tags, var.tags)}"
}
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ variable "enable_nat_gateway" {
default = false
}

variable "enable_classiclink" {
description = "Should be true to enable ClassicLink in the created VPC"
default = false
}

variable "single_nat_gateway" {
description = "Should be true if you want to provision a single shared NAT Gateway across all of your private networks"
default = false
Expand Down