Skip to content

Commit

Permalink
add external_nat_ips variable to deal with empty nat_public_ips output
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Apr 10, 2020
1 parent 23b0a02 commit bab6512
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 70 deletions.
34 changes: 14 additions & 20 deletions README.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions examples/complete-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 0 additions & 4 deletions examples/ipv6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 0 additions & 4 deletions examples/issue-108-route-already-exists/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/issue-44-asymmetric-private-subnets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/issue-46-no-private-subnets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/manage-default-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/network-acls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/secondary-cidr-blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions examples/simple-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 1 addition & 5 deletions examples/test_fixture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -34,7 +30,7 @@ No requirements.
## Inputs

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

## Outputs
Expand Down
4 changes: 0 additions & 4 deletions examples/vpc-flow-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 0 additions & 4 deletions examples/vpc-separate-private-route-tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,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" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bab6512

Please sign in to comment.