cloudflare adapter

Manage resources on the cloudflare api. Including zero-trust services.

Usage example

This simple example shows how to create a CfdTunnel.

import cloudflare
import cloudflare::base

api = cloudflare::base::Api(
    token="test token",
)

account = cloudflare::Account(
    api=api,
    name="test account",
    managed=false,
)

cloudflare::CfdTunnel(
    api=api,
    account=account,
    config_src="cloudflare",
    name="test",
    config=Config(
        ingress=[
            IngressRule(
                hostname="test.example.com",
                service="http://127.0.0.1:8888",
            ),
            IngressRule(
                service="http_status:404",
            ),
        ],
        warp_routing=WarpRouting(enabled=false),
    ),
    purged=false,
)