Skip to content

Commit f28da8a

Browse files
authored
[vpc] Add max_nats configuration (#1158)
1 parent 94a4258 commit f28da8a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

modules/vpc/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ components:
125125
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,<br>set as tag values, and output by this module individually.<br>Does not affect values of tags passed in via the `tags` input.<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.<br>Default value: `lower`. | `string` | `null` | no |
126126
| <a name="input_labels_as_tags"></a> [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.<br>Default is to include all labels.<br>Tags with empty values will not be included in the `tags` output.<br>Set to `[]` to suppress all generated tags.<br>**Notes:**<br> The value of the `name` tag, if included, will be the `id`, not the `name`.<br> Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be<br> changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | <pre>[<br> "default"<br>]</pre> | no |
127127
| <a name="input_map_public_ip_on_launch"></a> [map\_public\_ip\_on\_launch](#input\_map\_public\_ip\_on\_launch) | Instances launched into a public subnet should be assigned a public IP address | `bool` | `true` | no |
128+
| <a name="input_max_nats"></a> [max\_nats](#input\_max\_nats) | Upper limit on number of NAT Gateways/Instances to create.<br>Set to 1 or 2 for cost savings at the expense of availability.<br>Default creates a NAT Gateway in each public subnet. | `number` | `null` | no |
128129
| <a name="input_max_subnet_count"></a> [max\_subnet\_count](#input\_max\_subnet\_count) | Sets the maximum amount of subnets to deploy. 0 will deploy a subnet for every provided availability zone (in `region_availability_zones` variable) within the region | `number` | `0` | no |
129130
| <a name="input_name"></a> [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.<br>This is the only ID element not also included as a `tag`.<br>The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
130131
| <a name="input_namespace"></a> [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |

modules/vpc/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ module "subnets" {
149149
igw_id = var.public_subnets_enabled ? [module.vpc.igw_id] : []
150150
map_public_ip_on_launch = var.map_public_ip_on_launch
151151
max_subnet_count = local.max_subnet_count
152+
max_nats = var.max_nats
152153
nat_gateway_enabled = var.nat_gateway_enabled
153154
nat_instance_enabled = var.nat_instance_enabled
154155
nat_instance_type = var.nat_instance_type

modules/vpc/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ variable "public_subnets_enabled" {
104104
default = true
105105
}
106106

107+
variable "max_nats" {
108+
type = number
109+
description = <<-EOT
110+
Upper limit on number of NAT Gateways/Instances to create.
111+
Set to 1 or 2 for cost savings at the expense of availability.
112+
Default creates a NAT Gateway in each public subnet.
113+
EOT
114+
default = null
115+
}
116+
107117
variable "nat_gateway_enabled" {
108118
type = bool
109119
description = "Flag to enable/disable NAT gateways"

0 commit comments

Comments
 (0)