Skip to content

Add Cloudflare TypeScript examples - #3000

Open
cnunciato wants to merge 4 commits into
masterfrom
cnunciato/cloudflare-examples
Open

Add Cloudflare TypeScript examples#3000
cnunciato wants to merge 4 commits into
masterfrom
cnunciato/cloudflare-examples

Conversation

@cnunciato

@cnunciato cnunciato commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds three Cloudflare TypeScript examples:

  • cloudflare-ts-serverless-d1 — a Worker backed by a D1 (serverless SQLite) database; records each visit and returns the running total.
  • cloudflare-ts-dns — manages DNS records on a zone (an A, a CNAME, and a TXT record).
  • cloudflare-ts-cdn-waf — puts Cloudflare in front of an origin: a proxied DNS record, an edge-cache ruleset, and a rate-limiting ruleset.

All three are deploy-verified end to end against a Cloudflare account (the DNS and CDN/WAF examples require an existing zone).

Try them with pulumi new against this branch (each prompts for its config; all need an API token):

export CLOUDFLARE_API_TOKEN=<token>

# Worker + D1 database (prompts for accountId)
pulumi new https://github.com/pulumi/examples/tree/cnunciato/cloudflare-examples/cloudflare-ts-serverless-d1
pulumi up

# DNS records — needs an existing zone (prompts for zoneId)
pulumi new https://github.com/pulumi/examples/tree/cnunciato/cloudflare-examples/cloudflare-ts-dns
pulumi up

# CDN + WAF in front of an origin — needs an existing zone (prompts for zoneId and origin)
pulumi new https://github.com/pulumi/examples/tree/cnunciato/cloudflare-examples/cloudflare-ts-cdn-waf
pulumi up

- cloudflare-ts-serverless-d1: Worker backed by a D1 SQL database
- cloudflare-ts-dns: managing DNS records on a zone
- cloudflare-ts-cdn-waf: CDN caching and rate limiting in front of an origin

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cnunciato
cnunciato requested a review from cscherle September 9, 2026 19:54
cnunciato and others added 2 commits September 9, 2026 13:07
…d export the FQDN url

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cnunciato
cnunciato marked this pull request as ready for review September 9, 2026 20:19
@cnunciato
cnunciato requested a review from jkodroff September 9, 2026 21:11
…tFile

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant