nat-instance
garbetjie/nat-instance/google
Terraform module for creating NAT instances in GCP.
Terraform Module: NAT instances (Google provider) ================================================= A simple Terraform module for Google Cloud Platform that creates a NAT instance to forward traffic from internal instances without external IP addresses to the internet. Why? By default, Google Compute instances without an external IP address are unable to access the internet. Google also provides Cloud NAT which provides the same functionality as is implemented in this module. However, as per https://cloud.google.com/nat/docs/ports-and-addresses#ports-reuse-tcp, Google Cloud enforces a two-minute delay before the gateway can reuse the same NAT source IP address and source port tuple with the same destination (destination IP address, destination port, and protocol). This poses a problem when
| Name | Type | Description | Default |
|---|---|---|---|
| address | string | External IP address to assign to this instance. | required |
| zone | string | Zone in which to place this instance. Must be the same region as the IP address | required |
| network_tags | set(string) | Tags to which this route applies. Defaults to ["requires-nat-${local.region}"] | [] |
| wait_duration | number | The duration (in seconds) to wait for the NAT instance to finish starting up. | 10 |
| disk_size | number | Size of the instance's disk (in GB). | 15 |
| disk_type | string | Type of the instance's disk (one of `pd-standard` or `pd-ssd`). `google` provide | "pd-standard" |
| machine_type | string | Machine type of the instance. | "f1-micro" |
| socks_proxy | object({ enabled = bool | Configuration for managing a SOCKS proxy on this instance. | {
"allowed_ranges": [],
"debug": 0,
|
| sysctl_config | map(string) | sysctl configuration to apply on startup. | {} |
| route_priority | number | The priority to assign the networking route that routes traffic through this ins | 900 |
address — Internal IP address of this NAT instance.nat_address — NAT IP address of this NAT instance.disk_size — Size of the instance's disk (in GB).network_tags — Tags to which this instance's route applies.instance_name — Name of the Compute Engine instance.route_name — Name of the route used to route traffic through the instance.route_priority — Priority assigned to the networking route used to route traffic through this instance.zone — Zone in which the Compute Engine instance has been placed.machine_type — Machine type of the instance.disk_type — Type of the instance's disk.wait_duration — The duration (in seconds) that was allowed for the NAT instance to finish booting.sysctl_config — sysctl config applied on NAT instance boot.socks_proxy — SOCKS proxy config applied.Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,