Net Address Reservation Module
This module allows reserving Compute Engine external, global, and internal addresses.
External and global addresses
module "addresses" {
source = " ./fabric/modules/net-address"
project_id = var. project_id
external_addresses = {
nat-1 = var.region
vpn-remote = var.region
}
global_addresses = [" app-1" , " app-2" ]
}
# tftest modules=1 resources=4
module "addresses" {
source = " ./fabric/modules/net-address"
project_id = var. project_id
internal_addresses = {
ilb-1 = {
purpose = " SHARED_LOADBALANCER_VIP"
region = var.region
subnetwork = var.subnet.self_link
}
ilb-2 = {
address = " 10.0.0.2"
region = var.region
subnetwork = var.subnet.self_link
}
}
}
# tftest modules=1 resources=2
module "addresses" {
source = " ./fabric/modules/net-address"
project_id = var. project_id
psa_addresses = {
cloudsql-mysql = {
address = " 10.10.10.0"
network = var.vpc.self_link
prefix_length = 24
}
}
}
# tftest modules=1 resources=1
module "addresses" {
source = " ./fabric/modules/net-address"
project_id = var. project_id
psc_addresses = {
one = {
address = null
network = var.vpc.self_link
}
two = {
address = " 10.0.0.32"
network = var.vpc.self_link
}
}
}
# tftest modules=1 resources=2
name
description
type
required
default
project_id
Project where the addresses will be created.
string
✓
external_addresses
Map of external address regions, keyed by name.
map(string)
{}
global_addresses
List of global addresses to create.
list(string)
[]
internal_addresses
Map of internal addresses to create, keyed by name.
map(object({…}))
{}
psa_addresses
Map of internal addresses used for Private Service Access.
map(object({…}))
{}
psc_addresses
Map of internal addresses used for Private Service Connect.
map(object({…}))
{}