digitalocean/terraform-digitalocean-droplet-internet-gateway

HCL

Open original ↗

Captured source

source ↗

digitalocean/terraform-digitalocean-droplet-internet-gateway

Description: Terraform module to create IGW droplets and optional configure DOKS cluster with default route

Language: HCL

License: Apache-2.0

Stars: 0

Forks: 0

Open issues: 1

Created: 2025-04-23T19:17:48Z

Pushed: 2026-01-06T19:14:16Z

Default branch: main

Fork: no

Archived: yes

README: > [!WARNING] > ## This repository is deprecated > > This module has been consolidated into the scale-with-simplicity repository. > > New location: reference-architectures/nat-gateway > > This repository will be archived. Please update your module references to use the new location.

---

terraform-do-droplet-internet-gateway

This module creates one or more droplets and configures them as Internet gateways (IGW). The module will optionally configure a DOKS cluster that has the Routing Agent installed to use the IGWs as the cluster's default route.

The IGW droplets will be named based on a specified name_prefix var along with the region and a serial number. Deploying two IGWs with name_prefix of igw in nyc3 region would create two droplets: igw-nyc3-0 and igw-nyc3-1.

These deployed IGWs will be configured with IP Forwarding and Masquerade enabled.

Note: Unfortunately, due to the way Terraform handles provider blocks, this module cannot be used to configure more than one DOKS cluster. If you need to configure multiple DOKS clusters, it's recommended to manually configue the Routing Agent using the values of the output igw_private_ips as the default gateway addresses.

Example

module "igw" {
source = "git@github.com:digitalocean/terraform-do-droplet-internet-gateway.git"
name_prefix = "igw"
igw_count = 2
region = "nyc3"
size = "c-2"
image = "ubuntu-24-04-x64"
vpc_id = "d6b0cb8a-07ea-40d6-9031-70a43d070000"
ssh_keys = [1234]
tags = ["igw", "nyc3"]
doks_cluster_name = "nyc3-prod1"
}

Support

This Terraform module is provided as a reference implementation and must be fully tested in your own environment before using it in production. The Terraform Provider and its resources are supported, but this module itself is not officially supported.

Notability

notability 3.0/10

Routine Terraform module repo