Skip to content

CatalogSync

Source: src/Cloudflare/MagicCloudNetworking/CatalogSync.ts

A Magic Cloud Networking catalog sync — continuously materializes the catalog of discovered cloud resources (filtered by a policy expression) into a destination such as a Zero Trust list.

The destination is provisioned when the sync is created, so destinationType is immutable and forces a replacement; name, description, policy, and updateMode are all patched in place.

Magic Cloud Networking is an entitlement-gated add-on (Magic WAN family). On accounts without the entitlement every API call fails with the typed FeatureNotEnabled error (Cloudflare code 1012, “feature not enabled”).

Sync discovered VPC CIDRs into a Zero Trust list

const sync = yield* Cloudflare.CatalogSync("VpcCidrs", {
destinationType: "ZERO_TRUST_LIST",
updateMode: "AUTO",
policy: "kind in ('aws_vpc','azurerm_virtual_network','google_compute_network')",
});
// sync.destinationId is the provisioned Zero Trust list

Manual sync without a destination

yield* Cloudflare.CatalogSync("DryRun", {
destinationType: "NONE",
updateMode: "MANUAL",
});
yield* Cloudflare.CatalogSync("VpcCidrs", {
destinationType: "ZERO_TRUST_LIST",
updateMode: "AUTO",
deleteDestination: false,
});