Skip to content

GCP Static IP

Andy Potanin edited this page Jun 21, 2026 · 1 revision

Creates regional and global static IP addresses in GCP.

Use this module when a Rabbit service needs reserved IP addresses for load balancers, Gateway API, or internal services.

Supported Features

  • Regional external static IP addresses.
  • Global static IP addresses for HTTP(S) load balancers.
  • Internal static IP addresses.
  • Configurable network tier.
  • Multiple IPs in a single module instance via the static_ips map.

Prerequisites

  • GCP credentials with permission to manage Compute Engine addresses.

Important Notes

  • Each entry in static_ips creates one IP address. The key is a logical identifier.
  • address_type determines the IP type: EXTERNAL (regional), GLOBAL (global), or INTERNAL.
  • Global IPs do not use a region field.
  • Internal IPs require a subnetwork reference.
  • The module separates IPs into regional and global resources based on address_type.

Minimal Example

services:
  - name: "GCP Static IP"
    module: "gcp-static-ip"
    id: "static-ips"
    deployment_order: 15
    configurations:
      region: "us-central1"
      static_ips:
        gateway-api-ip:
          name: "gateway-api-ip"
          region: "us-central1"
          address_type: "EXTERNAL"
          network_tier: "PREMIUM"
          description: "Static IP for Gateway API"

Outputs

Output Description
regional_ip_addresses Map of regional static IP addresses with name, address, region, and self_link.
global_ip_addresses Map of global static IP addresses with name, address, and self_link.
all_ip_addresses All static IP addresses (regional and global) as a name-to-address map.

Full Configuration Schema

The fields below are public module inputs under configurations.

configurations:
  region: "us-central1"
  network_tier: "PREMIUM"
  static_ips:
    <ip_key>:
      name: ""
      region: "us-central1"
      address_type: "EXTERNAL"
      network_tier: "PREMIUM"
      description: ""
      subnetwork: ""

Top-Level Fields

Field Type Required Description
region string No Default region for regional IPs. Defaults to us-central1.
network_tier string No Default network tier. Defaults to PREMIUM.
static_ips map[static_ip] Yes Map of static IP definitions.

static_ips

Field Type Required Description
name string Yes IP address resource name.
region string Conditional GCP region. Required for regional and internal IPs.
address_type string Yes IP type: EXTERNAL, GLOBAL, or INTERNAL.
network_tier string No Network tier: PREMIUM or STANDARD. Defaults to PREMIUM.
description string No IP address description.
subnetwork string Conditional Subnetwork self-link. Required when address_type is INTERNAL.

Clone this wiki locally