nat-gateway

GoogleCloudPlatform/nat-gateway/google

Terraform Module HCL GOOGLE ✓ Verified

Modular NAT Gateway on Google Compute Engine for Terraform.

Install
module "nat-gateway" {
source = "GoogleCloudPlatform/nat-gateway/google"
version = "1.2.3"
}
⭐ Source on GitHub 📦 Registry page
README

NAT Gateway Terraform Module Deprecation Notice NOTE: This module is no longer maintained. Please use Cloud NAT instead. For information on how to migrate to the Cloud NAT module, refer to the migration guide. Usage ``ruby module "nat" { source = "GoogleCloudPlatform/nat-gateway/google" region = "us-central1" network = "default" subnetwork = "default" } ` And add the tag ${module.nat.routing_tag_regional} to your instances without external IPs to route outbound traffic through the nat gateway. Usage `ruby module "mig" { source = "GoogleCloudPlatform/managed-instance-group/google" version = "1.1.14" region = "us-central1" zone = "us-central1-a" name = "testnat" target_tags = ["${module.nat.routing_tag_regional}"] network = "default" subnetwork = "default" } ` Resources created - module.nat-

Inputs (24)
NameTypeDescriptionDefault
regionstringThe region to create the nat gateway instance in. required
autohealing_enabledstringEnable instance autohealing using http health checkfalse
module_enabledstringTo disable this module, set this to falsetrue
subnetworkstringThe subnetwork to deploy to"default"
tagslistAdditional compute instance network tags to apply route to.[]
machine_typestringThe machine type for the NAT gateway instance"n1-standard-1"
compute_imagestringImage used for NAT compute VMs."projects/debian-cloud/global/images/fam
squid_configstringThe squid config file to use. If not specifed the module file config/squid.conf ""
network_projectstringName of the project for the network. Useful for shared VPC. Default is var.proje""
namestringPrefix added to the resource names, for example 'prod-'. By default, resources w""
route_prioritystringThe priority for the Compute Engine Route800
ssh_source_rangeslistNetwork ranges to allow SSH from[ "0.0.0.0/0" ]
service_account_emailstringThe email of the service account for the instance template."default"
dest_rangestringThe destination IPv4 address range that this route applies to"0.0.0.0/0"
projectstringThe project to deploy to, if not set the default provider project is used.""
ip_address_namestringName of an existing reserved external address to use.""
ipstringOverride the internal IP. If not provided, an internal IP will automatically be ""
squid_enabledstringEnable squid3 proxy on port 3128."false"
ssh_fw_rulestringWhether or not the SSH Firewall Rule should be createdtrue
networkstringThe network to deploy to"default"
zonestringOverride the zone used in the `region_params` map for the region.""
Outputs (6)
instance — The self link to the NAT gateway instance.
external_ip — The external IP address of the NAT gateway instance.
routing_tag_regional — The tag that any other instance will need to have in order to get the regional routing rule
routing_tag_zonal — The tag that any other instance will need to have in order to get the zonal routing rule
depends_id — Value that can be used for intra-module dependency creation.
gateway_ip — The internal IP address of the NAT gateway instance.
Resources (3)
google_compute_addressgoogle_compute_firewallgoogle_compute_route
Details
FrameworkTerraform Module
LanguageHCL
Version1.2.3
Cloud GOOGLE
★ Stars156
Forks128
Total downloads71.1k
Inputs24
Outputs6
Resources3
Examples8
LicenseApache-2.0
NamespaceGoogleCloudPlatform
Updated