Cloudflare integration

What is Cloudflare?

Cloudflare is a CDN (Content Delivery Network) which enables load balancing by serving the files from the server location closest to the user. It ensures that applications are delivered reliably and securely, with traffic routed to the appropriate IP addresses.

The service can be combined with Buddy and Amazon Web Services to enhance security of your applications with SSL certificates and Cloudflare’s DDoS attacks protection.

By adding the Cloudflare action at the end of your pipeline, you can configure Buddy to automatically invalidate Cloudflare’s cache upon every deployment:

Image loading...Pipeline example for Cloudflare integration

Setting up Cloudflare integration

  1. As the first step, navigate to the Integrations tab and click New integration.

  2. Look up and click Cloudflare (you can find it in the PaaS section):

Image loading...Cloudflare integration selection

  1. The configuration window will appear:

Image loading...Cloudflare integration configuration

Here, you need to provide:

  • integration name
  • Access Token or the API Key depending on the authorization method you have decided on.
Hint
You can adjust the privacy settings of your integration (i.e. who can use it and where) in the Sharing tab.
  1. Once configured, simply click the New integration button to be able to use Cloudflare in your workspace.

Retrieving the access token

  1. Navigate to https://dash.cloudflare.com/profile/api-tokens and click Create Token:

Image loading...Creating token in Cloudflare account

  1. Scroll down to Custom token and click Get started:

Image loading...Adding custom token in Cloudflare

  1. Create a token with, at least, those two permissions:

Image loading...Cloudflare token configuration

  1. Copy the generated key and paste it in the Cloudflare Token field of the configuration window in Buddy.

Obtaining the API key

  1. Provide your Cloudflare account email in the integration configuration window:

Image loading...Cloudflare configuration with API Key

  1. Navigate to https://dash.cloudflare.com/profile/api-tokens or click Get API key in the configuration window.

  2. Click the View button next to the Global API key and copy it:

Image loading...Obtaining API Key from Cloudflare

  1. Paste the key in the API key field of the configuration window.
Hint

📚 Learn more about Cloudflare action features, integrations and alternatives.

Last modified on Sep 23, 2024