Drupal is a registered trademark of Dries Buytaert
drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)!

The base framework for the Cloudflare module suite. It provides named credential sets, resolution of account IDs and API tokens from settings.php, and a shared HTTP client factory that the other Cloudflare modules build on.

You usually install this module because another Cloudflare module (such as the Cloudflare AI Gateway) depends on it. On its own it adds a small admin screen for managing credential sets and the services those modules use; it makes no calls to Cloudflare by itself.

Features

  • A credential set configuration entity, identified by a machine name and label only. Nothing account-specific is stored in configuration or the database.
  • Account ID and API token resolved from settings.php, keyed by the credential set's machine name ($settings['cloudflare']['credentials'][<id>]).
  • Support for multiple named credential sets, for example different tokens for different purposes or accounts.
  • A pluggable credential resolver behind an interface, so the secret source can be changed without changing callers.
  • A shared HTTP client factory that binds a base URI and default headers over Drupal core's HTTP client, with a typed exception.

Post-Installation

This module has no standalone features beyond credential management; you install it because another Cloudflare module needs it. After enabling it:

  1. Add a credential set at Configuration > Web services > Cloudflare credentials, giving it a machine name.
  2. Add its account ID and API token to settings.php, keyed by that machine name:
    $settings['cloudflare']['credentials']['my_account'] = [
      'account_id' = 'your-account-id',
      'token' = 'your-token',
    ];

Other Cloudflare modules then reference the credential set by its machine name.

Additional Requirements

This module requires no modules outside of Drupal core. To make a credential set useful you need a Cloudflare account and an API token. Install with Composer:

composer require drupal/cloudflare_sdk

While the suite is in alpha, require it as drupal/cloudflare_sdk:^1.0@alpha (or set your project's minimum-stability to alpha) so the pre-stable releases resolve.

This module exists to support the rest of the Cloudflare suite:

Similar projects

The existing Cloudflare module integrates CDN and cache management. This module is narrower and reusable: a credential and HTTP foundation that keeps account IDs and tokens in settings.php and gives the other Cloudflare suite modules one shared credential model.

Supporting this Module

Issue reports, patches and feedback are welcome in the project's issue queue.

Community Documentation

For creating a Cloudflare API token, see Cloudflare's documentation at developers.cloudflare.com/fundamentals/api/get-started/create-token.

Activity

Total releases
2
First release
Jun 2026
Latest release
3 hours ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha2 Pre-release Jun 21, 2026
1.0.0-alpha1 Pre-release Jun 21, 2026