Skip to content

Commit

Permalink
feat: Add support for maximum number of NAT Gateways
Browse files Browse the repository at this point in the history
  • Loading branch information
alextrepa committed May 17, 2024
1 parent 5d50ad3 commit c7be1ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module "network" {
| <a name="input_stage"></a> [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| <a name="input_subnets_availability_zones"></a> [subnets\_availability\_zones](#input\_subnets\_availability\_zones) | Availability zones for the subnets. | `list(string)` | <pre>[<br> "us-east-1a",<br> "us-east-1b"<br>]</pre> | no |
| <a name="input_subnets_ipv4_cidr_block"></a> [subnets\_ipv4\_cidr\_block](#input\_subnets\_ipv4\_cidr\_block) | IPv4 CIDR Block for the subnets. | `list(string)` | <pre>[<br> "10.0.0.0/16"<br>]</pre> | no |
| <a name="input_subnets_max_nats"></a> [subnets\_max\_nats](#input\_subnets\_max\_nats) | Upper limit on number of NAT Gateways/Instances to create. Set to 1 or 2 for cost savings at the expense of availability. | `number` | `999` | no |
| <a name="input_subnets_nat_gateway_enabled"></a> [subnets\_nat\_gateway\_enabled](#input\_subnets\_nat\_gateway\_enabled) | Set to `true` to create a nat gateway in each subnet. | `bool` | `false` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).<br>Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
| <a name="input_tenant"></a> [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module "subnets" {
ipv4_cidr_block = var.subnets_ipv4_cidr_block
availability_zones = var.subnets_availability_zones
nat_gateway_enabled = var.subnets_nat_gateway_enabled
max_nats = var.subnets_max_nats

context = module.this.context
}
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ variable "subnets_nat_gateway_enabled" {
description = "Set to `true` to create a nat gateway in each subnet."
}

variable "subnets_max_nats" {
type = number
default = 999
description = "Upper limit on number of NAT Gateways/Instances to create. Set to 1 or 2 for cost savings at the expense of availability."
}

variable "s3_endpoint_enabled" {
type = bool
default = false
description = "Set to `true` to create a VPC gateway endpoint for S3."
}

0 comments on commit c7be1ff

Please sign in to comment.