Skip to content

GCP.CloudNumberRegistry reference

Source: src/GCP/CloudNumberRegistry/CustomRange.ts

A user-defined Cloud Number Registry IP range. Custom ranges track address space that discovery does not cover (on-prem subnets, and so on) and can only be added to user-managed realms.

customRangeId, location, realm, parentRange, and the CIDR replace the resource. Description, attributes, and labels update in place.

Range in a realm

const book = yield* GCP.CloudNumberRegistry.RegistryBook("Inventory", {});
const realm = yield* GCP.CloudNumberRegistry.Realm("Private", {
registryBook: book.name,
});
const range = yield* GCP.CloudNumberRegistry.CustomRange("OnPrem", {
realm: realm.name,
ipv4CidrRange: "10.0.0.0/22",
description: "on-prem campus",
});

Child range

const child = yield* GCP.CloudNumberRegistry.CustomRange("Building", {
parentRange: parent.name,
ipv4CidrRange: "10.0.0.0/24",
});
const range = yield* GCP.CloudNumberRegistry.CustomRange("OnPrem", {
realm: realm.name,
ipv4CidrRange: "10.0.0.0/22",
description: "on-prem campus v2",
labels: { env: "prod" },
});

Source: src/GCP/CloudNumberRegistry/IpamAdminScope.ts

A Cloud Number Registry IPAM admin scope — the organization-wide boundary for IP address discovery. Only one project in an organization may own the admin scope. Creating it also creates a default registry book and starts discovery (up to 24 hours).

ipamAdminScopeId, location, and scopes replace the resource. Platforms and labels update in place.

IpamAdminScope: Creating an IPAM Admin Scope

Section titled “IpamAdminScope: Creating an IPAM Admin Scope”
const scope = yield* GCP.CloudNumberRegistry.IpamAdminScope("Org", {
scopes: ["organizations/1234567890"],
enabledAddonPlatforms: ["COMPUTE_ENGINE"],
labels: { env: "prod" },
});

IpamAdminScope: Updating an IPAM Admin Scope

Section titled “IpamAdminScope: Updating an IPAM Admin Scope”
const scope = yield* GCP.CloudNumberRegistry.IpamAdminScope("Org", {
scopes: ["organizations/1234567890"],
labels: { env: "prod", role: "ipam" },
});

Source: src/GCP/CloudNumberRegistry/Realm.ts

A Cloud Number Registry realm — a routing domain of IP ranges that must not overlap (unless one range is the parent of another). Custom ranges can only be added to user-managed realms.

realmId, location, registryBook, trafficType, managementType, and ipVersion replace the resource. Labels update in place.

const book = yield* GCP.CloudNumberRegistry.RegistryBook("Inventory", {});
const realm = yield* GCP.CloudNumberRegistry.Realm("Private", {
registryBook: book.name,
trafficType: "PRIVATE",
managementType: "USER",
ipVersion: "IPV4",
});
const realm = yield* GCP.CloudNumberRegistry.Realm("Private", {
registryBook: book.name,
labels: { env: "prod" },
});

Source: src/GCP/CloudNumberRegistry/RegistryBook.ts

A Cloud Number Registry book — a container for IP address management information. Creating an IPAM admin scope also creates a default book; additional books organize discovered or user-managed realms.

registryBookId and location replace the resource. claimedScopes and labels update in place.

Generated name

const book = yield* GCP.CloudNumberRegistry.RegistryBook("Inventory", {});

Named book that claims a project

const book = yield* GCP.CloudNumberRegistry.RegistryBook("Inventory", {
registryBookId: "inventory",
claimedScopes: ["projects/my-project"],
labels: { env: "prod" },
});
const book = yield* GCP.CloudNumberRegistry.RegistryBook("Inventory", {
registryBookId: "inventory",
labels: { env: "prod", role: "ipam" },
});