Integrations•7 min read

Cloudflare DNS & Edge Network Integration Setup Guide

Connect Cloudflare to Valstorm so your team and Valstorm AI assistants can inspect domains and DNS records, check SSL/TLS edge settings, manage approved DNS changes, and purge edge cache directly from Valstorm.


How Valstorm Connects to Cloudflare

  • Organization Scope (Multi-Token): Cloudflare connects at the Organization level using scoped Cloudflare Account API Tokens. You can add multiple tokens with different permission levels and zone access (for example, a Read-Only token for reporting and a DNS Editor token for your engineering team).
  • Encrypted & Shared With Your Team: Every token is encrypted at rest and private to the administrator who added it until shared with specific Users or User Groups under Shared With. Team members never need individual Cloudflare logins in Valstorm — access is governed automatically by the tokens shared with them.
  • Automatic Discovery: You only paste the API token in Valstorm. Valstorm automatically discovers your Cloudflare Account, accessible domains (zones), and granted permissions—no manual Account ID or Zone ID entry is required.
  • Built-In Production Safety Guardrails: Valstorm includes built-in safeguards that protect critical production DNS records (such as root/apex and core mail/nameserver records) from accidental edits or deletions, keeping AI-assisted DNS updates safe by default.

Prerequisites

  • A Cloudflare account member with Super Administrator - All Privileges or API Token Provisioning permissions so you can create Account API Tokens.
    • Note: If you do not see Manage Account → Account API Tokens in Cloudflare's left navigation menu after selecting your account, you will need someone with one of those roles to create the Account API Token for you or request higher permissions on the Cloudflare account.
  • Valstorm Admin access (or a delegated Cloudflare Org Manager role in Valstorm Command Center).

Step 1: Create a Scoped Account API Token in Cloudflare

Security Tip: Always use a scoped Account API Token—never your Cloudflare Global API Key or a personal user token. Account API Tokens belong to your organization's Cloudflare account rather than an individual employee and can be restricted to the exact zones and permissions Valstorm needs.

  1. Sign in to the Cloudflare Dashboard and select your organization's account.
  2. In the left navigation menu, go to Manage Account → Account API Tokens.
    • (Don't see Manage Account? You must hold Super Administrator - All Privileges or API Token Provisioning permissions in Cloudflare—ask an account Super Administrator to create the token for you or grant you those permissions.)
  3. Click Create Token.
  4. Scroll to the bottom and click Get started next to Create Custom Token.
  5. Enter a clear Token name (for example, Valstorm DNS Read-Only or Valstorm Staging DNS Editor).

Step 2: Configure Permissions, Zone Resources & Token Expiration

1. Set Token Permissions

Under Permissions, add the minimum access required for the token you are creating:

ScopePermissionAccess LevelWhat It Enables in Valstorm
ZoneZoneReadDiscover accessible domains (zones) automatically
ZoneDNSRead (or Edit)Inspect DNS records (A, AAAA, CNAME, TXT, MX); choose Edit only if you want Valstorm to create, update, or delete approved DNS records
ZoneZone SettingsReadInspect SSL/TLS encryption modes, Always Use HTTPS, and edge settings
ZoneCache PurgePurge (optional)Purge Cloudflare edge cache for approved URLs

Recommended Best Practice: Create separate tokens for different teams—for example, a Read-Only token (Zone:Read, DNS:Read, Zone Settings:Read) shared broadly, and a separate DNS Editor token (DNS:Edit, Cache Purge:Purge) shared only with engineers who manage deployments.

2. Choose Zone Resources

Under Zone Resources, select which domains this token can access:

  • Include → All zones (if Valstorm should see every domain in your Cloudflare account), or
  • Include → Specific zone → <your-domain.com> (recommended when limiting a write token to specific domains).

3. Review Optional Expiration (TTL) & Create the Token

  • (Optional) Under TTL, you can set a Start Date and End Date if your security policy requires periodic token rotation. If you set an expiration date, set a calendar reminder to generate a replacement token and update it in Valstorm before it expires so connected workflows stay uninterrupted.
  • Click Continue to summary, review the permissions and zone scope, and click Create Token.
  • Copy the API token immediately—Cloudflare displays it only once.

Step 3: Save the API Token in Valstorm Command Center

  1. In Valstorm, open Command Center → Integrations.
  2. Under Organization Integrations, select Cloudflare DNS & Edge Network.
  3. Click Add New API Token.
  4. Fill in the form:
    • Token Label: A descriptive name (e.g., Prod DNS Read-Only or Staging Zone Editor).
    • Cloudflare Account API Token: Paste the Account API Token you copied in Step 2.
  5. Click Save.

Valstorm immediately validates the token against Cloudflare, detects its exact permissions, and maps all accessible domains automatically.


Step 4: Verify & Share With Your Team

  1. Click Verify on your Cloudflare integration card to confirm the token is active and refresh the list of accessible domains and detected capabilities.
  2. Review What You Can Do Through the AI and Associated Domains to verify the token matches your intended access level (write scopes like dns:write and cache_purge:write are highlighted in amber for quick auditing).
  3. Under Shared With, add the Users or User Groups who should have access to this token in Valstorm.
  4. (Optional) To allow non-admin engineers to manage Cloudflare tokens in Valstorm, use Delegated Org Managers to grant management access to specific team members.

Troubleshooting

IssueWhat to Check
I don't see Manage Account → Account API Tokens in CloudflareMake sure you clicked into your organization's account first, and confirm your Cloudflare member role includes Super Administrator - All Privileges or API Token Provisioning. If not, ask someone with higher status on your Cloudflare account to create the Account API Token for you or request those permissions.
401 Unauthorized / Invalid or expired tokenConfirm you copied the complete Account API Token (not the Global API Key) with no leading/trailing spaces. If the token has a TTL expiration date or was rolled/revoked in Cloudflare, generate a new token and update it in Command Center.
403 Forbidden / Missing permissionCheck the detected scopes on your Cloudflare card in Command Center. Edit or recreate the Account API Token in Cloudflare to include Zone → Zone → Read plus DNS (Read/Edit), Zone Settings → Read, or Cache Purge → Purge as needed, then click Verify.
Expected domains are missingIn Cloudflare, verify the token's Zone Resources includes the missing domain(s) (or All zones), then click Verify in Valstorm to refresh the domain list.
DNS write or delete is blocked by ValstormValstorm's built-in production safety guardrails prevent accidental edits or deletions on critical production records (such as apex/root domains and core mail/nameserver records). Verify you are targeting an approved non-production record and that your token includes Zone → DNS → Edit.
Team members don't see the Cloudflare integrationConfirm the users or their User Group are added under Shared With on at least one active Cloudflare token.

Need help? You can also view this guide inside Valstorm at Command Center → Integrations → Cloudflare DNS & Edge Network → Setup Guide, or ask your Valstorm AI assistant to walk you through setting up or verifying Cloudflare.