AddressingBgpPrefix
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.
Advertising a Prefix
Section titled “Advertising a Prefix”Advertise the whole BYOIP prefix
const bgp = yield* Cloudflare.AddressingBgpPrefix("advertise", { prefixId: prefix.prefixId, cidr: prefix.cidr, advertised: true,});Withdraw with AS-Path prepending configured
const bgp = yield* Cloudflare.AddressingBgpPrefix("advertise", { prefixId: prefix.prefixId, cidr: prefix.cidr, advertised: false, asnPrependCount: 2,});