Skip to content

Cdn

A Cdn fronts an origin (a Bucket object or a hostname) with a managed edge cache. On AWS this is CloudFront. On GCP it is Cloud CDN (backend bucket + URL map + HTTP proxy + forwarding rule).

Hetzner and DigitalOcean have no CDN in this release — no shims. ACM certificate provisioning and WAF are out of scope.

Property Type Required Description
name string yes Unique resource name
id string no Explicit ID (auto-generated UUID if omitted)
provider string no Provider label for multi-provider configs
tags Record<string, string> no Arbitrary key-value metadata
origin Bucket | string yes Origin bucket (object ref) or hostname
domain string no Optional custom alias (not provisioned as a cert)
import { Bucket, Cdn } from '@kykucloud/types'
const assets = new Bucket({ name: 'app-assets', region: 'us-east' })
const cdn = new Cdn({
name: 'app-cdn',
origin: assets,
})
Provider Supported Backend
AWS CloudFront
GCP Cloud CDN (backend bucket stack)
Hetzner Unsupported
DigitalOcean Unsupported
  • Object refs: pass a Bucket instance so the graph creates the bucket first.
  • No ACM: domain is an alias only; certificates are not requested.
  • No WAF: a separate WAF type is not added here. If WAF later grows past one resource type, stop and revisit.