Date: 2026-05-11
Time: 15:37
I'll create a summary entry for this Cloudflare DNS rule file.
This is an FTL2 AI-loop rule that ensures the arcade.catbeez18.com DNS A record points to the correct Linode IP address. It follows the observe-condition-action pattern: it checks current DNS resolution, compares it against the expected IP from FTL2 state, and updates Cloudflare DNS if they don't match. This is a reconciliation rule — it runs continuously to detect and fix DNS drift.
This rule is not called directly — it's loaded by the FTL2 AI reconciliation loop, which evaluates it periodically. The loop:
1. Runs the observe commands to gather current state
2. Calls condition(state) to check if action is needed
3. Calls action(ftl) if the condition returns True
# The observe block runs this command to get current DNS state:
dig +short arcade.catbeez18.com A
# The condition compares dig output against state file:
# state["_state_file"]["resources"]["arcade"]["ipv4"][0]
# The action calls the cloudflare_dns module:
await ftl.community.general.cloudflare_dns(
zone="catbeez18.com",
record="arcade",
type="A",
value=ip,
proxied=False, # DNS only, no Cloudflare proxy
state="present",
)
resources.arcade.ipv4 in the FTL2 state file (populated by a Linode provisioning step)zone, record, type, value, proxied, state — standard Cloudflare DNS module interfacearcade.ipv4 is empty in state, condition returns False — the rule silently skips rather than failing. This handles the case where the Linode hasn't been provisioned yet.proxied=False means traffic goes direct to the Linode, bypassing Cloudflare's CDN/proxy layer.ipv4[0] — if the Linode has multiple IPs, only the first is used for the A record.resources.arcade — this is written by a Linode provisioning rule (likely in the same rule set)community.general.cloudflare_dns: A community module accessed via ftl.community.general namespace (FQCN pattern)command module: The observe block uses the built-in command module to run dig