Cloudflare.Addressing reference
AddressMap
Section titled “AddressMap”Source:
src/Cloudflare/Addressing/AddressMap.ts
A Cloudflare Address Map — assigns account-owned or Cloudflare-assigned static IPs to zones (BYOIP / Enterprise static IPs).
Requires the BYOIP add-on or Cloudflare-assigned static IPs on the
account; without the entitlement every mutating call fails with the typed
FeatureNotEnabled error (address_maps_not_enabled_on_account).
AddressMap: Creating an Address Map
Section titled “AddressMap: Creating an Address Map”Disabled map with a description
const map = yield* Cloudflare.Addressing.AddressMap("static-ips", { description: "static ingress IPs", enabled: false,});Map with IPs and zone memberships
const map = yield* Cloudflare.Addressing.AddressMap("ingress", { description: "ingress", enabled: true, ips: ["192.0.2.1"], memberships: [{ identifier: zone.zoneId, kind: "zone" }],});AddressMap: Legacy TLS clients
Section titled “AddressMap: Legacy TLS clients”const map = yield* Cloudflare.Addressing.AddressMap("legacy", { enabled: true, defaultSni: "example.com",});BgpPrefix
Section titled “BgpPrefix”Source:
src/Cloudflare/Addressing/BgpPrefix.ts
A BGP prefix controlling on-demand advertisement of a BYOIP prefix (or a subnet of it) to the internet.
Cloudflare automatically creates BGP prefixes during BYOIP onboarding, so
reconcile adopts an existing BGP prefix matching the CIDR before creating
a new one. There is no delete API — destroying this resource only
withdraws the advertisement (advertised: false) and drops the state.
BgpPrefix: Advertising a Prefix
Section titled “BgpPrefix: Advertising a Prefix”Advertise the whole BYOIP prefix
const bgp = yield* Cloudflare.Addressing.BgpPrefix("advertise", { prefixId: prefix.prefixId, cidr: prefix.cidr, advertised: true,});Withdraw with AS-Path prepending configured
const bgp = yield* Cloudflare.Addressing.BgpPrefix("advertise", { prefixId: prefix.prefixId, cidr: prefix.cidr, advertised: false, asnPrependCount: 2,});Prefix
Section titled “Prefix”Source:
src/Cloudflare/Addressing/Prefix.ts
A BYOIP (Bring Your Own IP) prefix onboarded to Cloudflare’s network.
Requires the BYOIP enterprise add-on; onboarding a prefix is a contract
process (LOA, IRR/RPKI validation, manual approval) — approved flips
from "P" (pending) to "V" (active) on Cloudflare’s side and is never
waited on by this resource.
Only description is mutable; cidr, asn, and the LOA settings force
a replacement.
Prefix: Creating a Prefix
Section titled “Prefix: Creating a Prefix”Onboard a prefix with a pre-uploaded LOA
const prefix = yield* Cloudflare.Addressing.Prefix("byoip", { cidr: "192.0.2.0/24", asn: 64496, description: "production ingress", loaDocumentId: loa.id,});Delegate LOA creation to Cloudflare
const prefix = yield* Cloudflare.Addressing.Prefix("byoip", { cidr: "192.0.2.0/24", asn: 64496, delegateLoaCreation: true,});Prefix: Advertising the Prefix
Section titled “Prefix: Advertising the Prefix”const bgp = yield* Cloudflare.Addressing.BgpPrefix("advertise", { prefixId: prefix.prefixId, cidr: prefix.cidr, advertised: true,});PrefixDelegation
Section titled “PrefixDelegation”Source:
src/Cloudflare/Addressing/PrefixDelegation.ts
Delegates part of a BYOIP prefix to another Cloudflare account, allowing that account to use the delegated CIDR (e.g. for its own service bindings).
Delegations are create/delete only — every prop change forces a replacement.
PrefixDelegation: Delegating a Prefix
Section titled “PrefixDelegation: Delegating a Prefix”const delegation = yield* Cloudflare.Addressing.PrefixDelegation("share", { prefixId: prefix.prefixId, cidr: "192.0.2.0/26", delegatedAccountId: "023e105f4ecef8ad9ca31a8372d0c353",});ServiceBinding
Section titled “ServiceBinding”Source:
src/Cloudflare/Addressing/ServiceBinding.ts
Binds part of a BYOIP prefix to a Cloudflare service (CDN, Spectrum, or Magic Transit), routing traffic for the bound CIDR to that service.
Bindings are create/delete only — every prop change forces a
replacement. Provisioning to the edge is asynchronous: the binding is
returned immediately with provisioning.state: "provisioning" and flips
to "active" on Cloudflare’s side; the resource does not wait for it.
ServiceBinding: Binding a Prefix to a Service
Section titled “ServiceBinding: Binding a Prefix to a Service”const binding = yield* Cloudflare.Addressing.ServiceBinding("cdn", { prefixId: prefix.prefixId, cidr: "192.0.2.0/24", serviceId: cdnServiceId,});