Skip to content

AddressingPrefix

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.

Onboard a prefix with a pre-uploaded LOA

const prefix = yield* Cloudflare.AddressingPrefix("byoip", {
cidr: "192.0.2.0/24",
asn: 64496,
description: "production ingress",
loaDocumentId: loa.id,
});

Delegate LOA creation to Cloudflare

const prefix = yield* Cloudflare.AddressingPrefix("byoip", {
cidr: "192.0.2.0/24",
asn: 64496,
delegateLoaCreation: true,
});
const bgp = yield* Cloudflare.AddressingBgpPrefix("advertise", {
prefixId: prefix.prefixId,
cidr: prefix.cidr,
advertised: true,
});