Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

GoogleCloudPlatform/terraform-google-nat-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

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