This module provisions a NAT instance in Google Cloud that lets instances in a private subnet connect to resources outside your VPC network. A route is created to send internet traffic to the NAT instance.
Features:
- VM instance
- IP forwarding enabled
- Ubuntu 20.04 LTS
- Persistent iptables
- Route
0.0.0.0/0
destination900
priority- Route applies to instances with network tag
no-ext-ip
- Next hop is NAT instance
module "nat" {
source = "github.com/mscribellito/terraform-google-nat-instance"
project_id = "your-project-id"
region = "your-region"
subnetwork = "your-subnetwork-self-link"
}
No requirements.
Name | Version |
---|---|
5.27.0 |
Name | Source | Version |
---|---|---|
nat | github.com/mscribellito/terraform-google-vm-instance | n/a |
Name | Type |
---|---|
google_compute_route.nat | resource |
google_compute_image.ubuntu | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
disk_size | The disk size of the NAT instance. | number |
20 |
no |
disk_type | The disk type of the NAT instance. | string |
"pd-standard" |
no |
machine_type | The machine type of the NAT instance. | string |
"e2-micro" |
no |
name | The name of the NAT instance. | string |
"nat-instance" |
no |
network_tags | The network tags the NAT route applies to. | list(string) |
[ |
no |
project_id | The project to manage resources in. | string |
n/a | yes |
region | The region of the NAT instance. | string |
n/a | yes |
route_priority | The priority of the NAT route. | number |
900 |
no |
subnetwork | The subnetwork of the NAT instance. | string |
n/a | yes |
No outputs.