Skip to content
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

fix: empty nat_public_ips when using external eips #432

Merged
merged 7 commits into from
Jun 20, 2020
Merged
Changes from 1 commit
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
Next Next commit
add external_nat_ips variable to deal with empty nat_public_ips output
DrFaust92 committed May 25, 2020
commit e221077e9e75236bee4b222db07a072fcec40f85
4 changes: 0 additions & 4 deletions examples/complete-vpc/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
4 changes: 0 additions & 4 deletions examples/ipv6/README.md
Original file line number Diff line number Diff line change
@@ -15,10 +15,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
4 changes: 0 additions & 4 deletions examples/issue-108-route-already-exists/README.md
Original file line number Diff line number Diff line change
@@ -19,10 +19,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/issue-44-asymmetric-private-subnets/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/issue-46-no-private-subnets/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/manage-default-vpc/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/network-acls/README.md
Original file line number Diff line number Diff line change
@@ -19,10 +19,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/secondary-cidr-blocks/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
4 changes: 0 additions & 4 deletions examples/simple-vpc/README.md
Original file line number Diff line number Diff line change
@@ -21,10 +21,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
6 changes: 1 addition & 5 deletions examples/test_fixture/README.md
Original file line number Diff line number Diff line change
@@ -21,10 +21,6 @@ Finished in 4.25 seconds (files took 2.75 seconds to load)
This will destroy any existing test resources, create the resources afresh, run the tests, report back, and destroy the resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
@@ -34,7 +30,7 @@ No requirements.
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
|------|-------------|------|---------|:-----:|
| region | n/a | `string` | `"eu-west-1"` | no |

## Outputs
4 changes: 0 additions & 4 deletions examples/vpc-flow-logs/README.md
Original file line number Diff line number Diff line change
@@ -19,10 +19,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
4 changes: 0 additions & 4 deletions examples/vpc-separate-private-route-tables/README.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,6 @@ $ terraform apply
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

No provider.
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -320,7 +320,7 @@ output "nat_ids" {

output "nat_public_ips" {
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = aws_eip.nat.*.public_ip
value = var.reuse_nat_ips ? var.external_nat_ips : aws_eip.nat.*.public_ip
}

output "natgw_ids" {
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -298,6 +298,12 @@ variable "external_nat_ip_ids" {
default = []
}

variable "external_nat_ips" {
description = "List of EIPs to be assigned to the NAT Gateways (used in combination with reuse_nat_ips)"
type = list(string)
default = []
}

variable "enable_dynamodb_endpoint" {
description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
type = bool