Skip to content

Changelog

New updates and improvements at Cloudflare.

All products
hero image
  1. Audit Logs v2 dataset is now available via Logpush.

    This expands on earlier releases of Audit Logs v2 in the API and Dashboard UI.

    We recommend creating a new Logpush job for the Audit Logs v2 dataset.

    Timelines for General Availability (GA) of Audit Logs v2 and the retirement of Audit Logs v1 will be shared in upcoming updates.

    For more details on Audit Logs v2, refer to the Audit Logs documentation.

  1. Cloudflare Logpush can now deliver logs from using fixed, dedicated egress IPs. By routing Logpush traffic through a Cloudflare zone enabled with Aegis IP, your log destination only needs to allow Aegis IPs making setup more secure.

    Highlights:

    • Fixed egress IPs ensure your destination only accepts traffic from known addresses.
    • Works with any supported Logpush destination.
    • Recommended to use a dedicated zone as a proxy for easier management.

    To get started, work with your Cloudflare account team to provision Aegis IPs, then configure your Logpush job to deliver logs through the proxy zone. For full setup instructions, refer to the Logpush documentation.

  1. RulesetRule IDLegacy Rule IDDescriptionPrevious ActionNew ActionComments
    Cloudflare Managed Ruleset 100850Command Injection - Generic 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100851Remote Code Execution - Java DeserializationN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100852Command Injection - Generic 3N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100853Remote Code Execution - Common Bash Bypass BetaN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100854XSS - Generic JavaScriptN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100855Command Injection - Generic 4N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100856PHP Object InjectionN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100857Generic - Parameter FuzzingN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100858Code Injection - Generic 4N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100859SQLi - UNION - 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100860Command Injection - Generic 5N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100861Command Execution - GenericN/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100862GraphQL Injection - 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100863Command Injection - Generic 6N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100864Code Injection - Generic 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100865PHP Object Injection - 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100866SQLi - LIKE 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100867SQLi - DROP - 2N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100868Code Injection - Generic 3N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100869Command Injection - Generic 7N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100870Command Injection - Generic 8N/ADisabledThis is a New Detection
    Cloudflare Managed Ruleset 100871SQLi - LIKE 3N/ADisabledThis is a New Detection
  1. You can now build Workflows using Python. With Python Workflows, you get automatic retries, state persistence, and the ability to run multi-step operations that can span minutes, hours, or weeks using Python’s familiar syntax and the Python Workers runtime.

    Python Workflows use the same step-based execution model as JavaScript Workflows, but with Python syntax and access to Python’s ecosystem. Python Workflows also enable DAG (Directed Acyclic Graph) workflows, where you can define complex dependencies between steps using the depends parameter.

    Here’s a simple example:

    Python
    from workers import Response, WorkflowEntrypoint
    class PythonWorkflowStarter(WorkflowEntrypoint):
    async def run(self, event, step):
    @step.do("my first step")
    async def my_first_step():
    # do some work
    return "Hello Python!"
    await my_first_step()
    await step.sleep("my-sleep-step", "10 seconds")
    @step.do("my second step")
    async def my_second_step():
    # do some more work
    return "Hello again!"
    await my_second_step()
    class Default(WorkerEntrypoint):
    async def fetch(self, request):
    await self.env.MY_WORKFLOW.create()
    return Response("Hello Workflow creation!")

    Python Workflows support the same core capabilities as JavaScript Workflows, including sleep scheduling, event-driven workflows, and built-in error handling with configurable retry policies.

    To learn more and get started, refer to Python Workflows documentation.

  1. A new GA release for the Windows WARP client is now available on the stable releases downloads page.

    This release contains a hotfix for pre-login for multi-user for the 2025.6.1135.0 release.

    Changes and improvements

    • Fixes an issue where new pre-login registrations were not being properly created.

    Known issues

    • For Windows 11 24H2 users, Microsoft has confirmed a regression that may lead to performance issues like mouse lag, audio cracking, or other slowdowns. Cloudflare recommends users experiencing these issues upgrade to a minimum Windows 11 24H2 KB5062553 or higher for resolution.

    • Devices using WARP client 2025.4.929.0 and up may experience Local Domain Fallback failures if a fallback server has not been configured. To configure a fallback server, refer to Route traffic to fallback server.

    • Devices with KB5055523 installed may receive a warning about Win32/ClickFix.ABA being present in the installer. To resolve this false positive, update Microsoft Security Intelligence to version 1.429.19.0 or later.

    • DNS resolution may be broken when the following conditions are all true:

      • WARP is in Secure Web Gateway without DNS filtering (tunnel-only) mode.
      • A custom DNS server address is configured on the primary network adapter.
      • The custom DNS server address on the primary network adapter is changed while WARP is connected.

      To work around this issue, please reconnect the WARP client by toggling off and back on.

  1. You can now create a client (a Durable Object stub) to a Durable Object with the new getByName method, removing the need to convert Durable Object names to IDs and then create a stub.

    JavaScript
    // Before: (1) translate name to ID then (2) get a client
    const objectId = env.MY_DURABLE_OBJECT.idFromName("foo"); // or .newUniqueId()
    const stub = env.MY_DURABLE_OBJECT.get(objectId);
    // Now: retrieve client to Durable Object directly via its name
    const stub = env.MY_DURABLE_OBJECT.getByName("foo");
    // Use client to send request to the remote Durable Object
    const rpcResponse = await stub.sayHello();

    Each Durable Object has a globally-unique name, which allows you to send requests to a specific object from anywhere in the world. Thus, a Durable Object can be used to coordinate between multiple clients who need to work together. You can have billions of Durable Objects, providing isolation between application tenants.

    To learn more, visit the Durable Objects API Documentation or the getting started guide.

  1. Enterprise Gateway users can now use Bring Your Own IP (BYOIP) for dedicated egress IPs.

    Admins can now onboard and use their own IPv4 or IPv6 prefixes to egress traffic from Cloudflare, delivering greater control, flexibility, and compliance for network traffic.

    Get started by following the BYOIP onboarding process. Once your IPs are onboarded, go to Gateway > Egress policies and select or create an egress policy. In Select an egress IP, choose Use dedicated egress IPs (Cloudflare or BYOIP), then select your BYOIP address from the dropdown menu.

    Screenshot of a dropdown menu adding a BYOIP IPv4 address as a dedicated egress IP in a Gateway egress policy

    For more information, refer to BYOIP for dedicated egress IPs.

  1. A new GA release for the Windows WARP client is now available on the stable releases downloads page.

    This release contains minor fixes and improvements.

    Changes and improvements

    • Improvements to better manage multi-user pre-login registrations.
    • Fixed an issue preventing devices from reaching split-tunneled traffic even when WARP was disconnected.
    • Fix to prevent WARP from re-enabling its firewall rules after a user-initiated disconnect.
    • Improvement for faster client connectivity on high-latency captive portal networks.
    • Fixed an issue where recursive CNAME records could cause intermittent WARP connectivity issues.

    Known issues

    • For Windows 11 24H2 users, Microsoft has confirmed a regression that may lead to performance issues like mouse lag, audio cracking, or other slowdowns. Cloudflare recommends users experiencing these issues upgrade to a minimum Windows 11 24H2 version KB5062553 or higher for resolution.

    • Devices using WARP client 2025.4.929.0 and up may experience Local Domain Fallback failures if a fallback server has not been configured. To configure a fallback server, refer to Route traffic to fallback server.

    • Devices with KB5055523 installed may receive a warning about Win32/ClickFix.ABA being present in the installer. To resolve this false positive, update Microsoft Security Intelligence to version 1.429.19.0 or later.

    • DNS resolution may be broken when the following conditions are all true:

      • WARP is in Secure Web Gateway without DNS filtering (tunnel-only) mode.
      • A custom DNS server address is configured on the primary network adapter.
      • The custom DNS server address on the primary network adapter is changed while WARP is connected.

      To work around this issue, reconnect the WARP client by toggling off and back on.

  1. A new GA release for the macOS WARP client is now available on the stable releases downloads page.

    This release contains minor fixes and improvements.

    Changes and improvements

    • Fixed an issue preventing devices from reaching split-tunneled traffic even when WARP was disconnected.
    • Fix to prevent WARP from re-enabling its firewall rules after a user-initiated disconnect.
    • Improvement for faster client connectivity on high-latency captive portal networks.
    • Fixed an issue where recursive CNAME records could cause intermittent WARP connectivity issues.

    Known issues

    • macOS Sequoia: Due to changes Apple introduced in macOS 15.0.x, the WARP client may not behave as expected. Cloudflare recommends the use of macOS 15.4 or later.
    • Devices using WARP client 2025.4.929.0 and up may experience Local Domain Fallback failures if a fallback server has not been configured. To configure a fallback server, refer to Route traffic to fallback server.
  1. A new GA release for the Linux WARP client is now available on the stable releases downloads page.

    This release contains minor fixes and improvements.

    Changes and improvements

    • Fixed an issue preventing devices from reaching split-tunneled traffic even when WARP was disconnected.
    • Fix to prevent WARP from re-enabling its firewall rules after a user-initiated disconnect.
    • Improvement for faster client connectivity on high-latency captive portal networks.
    • Fixed an issue where recursive CNAME records could cause intermittent WARP connectivity issues.

    Known issues

    • Devices using WARP client 2025.4.929.0 and up may experience Local Domain Fallback failures if a fallback server has not been configured. To configure a fallback server, refer to Route traffic to fallback server.
  1. You can now subscribe to events from other Cloudflare services (for example, Workers KV, Workers AI, Workers) and consume those events via Queues, allowing you to build custom workflows, integrations, and logic in response to account activity.

    Event subscriptions architecture

    Event subscriptions allow you to receive messages when events occur across your Cloudflare account. Cloudflare products can publish structured events to a queue, which you can then consume with Workers or pull via HTTP from anywhere.

    To create a subscription, use the dashboard or Wrangler:

    Terminal window
    npx wrangler queues subscription create my-queue --source r2 --events bucket.created

    An event is a structured record of something happening in your Cloudflare account – like a Workers AI batch request being queued, a Worker build completing, or an R2 bucket being created. Events follow a consistent structure:

    Example R2 bucket created event
    {
    "type": "cf.r2.bucket.created",
    "source": {
    "type": "r2"
    },
    "payload": {
    "name": "my-bucket",
    "location": "WNAM"
    },
    "metadata": {
    "accountId": "f9f79265f388666de8122cfb508d7776",
    "eventTimestamp": "2025-07-28T10:30:00Z"
    }
    }

    Current event sources include R2, Workers KV, Workers AI, Workers Builds, Vectorize, Super Slurper, and Workflows. More sources and events are on the way.

    For more information on event subscriptions, available events, and how to get started, refer to our documentation.

  1. Wrangler's error screen has received several improvements to enhance your debugging experience!

    The error screen now features a refreshed design thanks to youch, with support for both light and dark themes, improved source map resolution logic that handles missing source files more reliably, and better error cause display.

    BeforeAfter (Light)After (Dark)
    Old error screenNew light theme error screenNew dark theme error screen

    Try it out now with npx wrangler@latest dev in your Workers project.

  1. This week's update

    This week, a series of critical vulnerabilities were discovered impacting core enterprise and open-source infrastructure. These flaws present a range of risks, providing attackers with distinct pathways for remote code execution, methods to breach internal network boundaries, and opportunities for critical data exposure and operational disruption.

    Key Findings

    • SonicWall SMA (CVE-2025-32819, CVE-2025-32820, CVE-2025-32821): A remote authenticated attacker with SSLVPN user privileges can bypass path traversal protections. These vulnerabilities enable a attacker to bypass security checks to read, modify, or delete arbitrary files. An attacker with administrative privileges can escalate this further, using a command injection flaw to upload malicious files, which could ultimately force the appliance to reboot to its factory default settings.

    • Ms-Swift Project (CVE-2025-50460): An unsafe deserialization vulnerability exists in the Ms-Swift project's handling of YAML configuration files. If an attacker can control the content of a configuration file passed to the application, they can embed a malicious payload that will execute arbitrary code and it can be executed during deserialization.

    • Apache Druid (CVE-2023-25194): This vulnerability in Apache Druid allows an attacker to cause the server to connect to a malicious LDAP server. By sending a specially crafted LDAP response, the attacker can trigger an unrestricted deserialization of untrusted data. If specific "gadgets" (classes that can be abused) are present in the server's classpath, this can be escalated to achieve Remote Code Execution (RCE).

    • Tenda AC8v4 (CVE-2025-51087, CVE-2025-51088): Vulnerabilities allow an authenticated attacker to trigger a stack-based buffer overflow. By sending malformed arguments in a request to specific endpoints, an attacker can crash the device or potentially achieve arbitrary code execution.

    • Open WebUI (CVE-2024-7959): This vulnerability allows a user to change the OpenAI URL endpoint to an arbitrary internal network address without proper validation. This flaw can be exploited to access internal services or cloud metadata endpoints, potentially leading to remote command execution if the attacker can retrieve instance secrets or access sensitive internal APIs.

    • BentoML (CVE-2025-54381): The vulnerability exists in the serialization/deserialization handlers for multipart form data and JSON requests, which automatically download files from user-provided URLs without proper validation of internal network addresses. This allows attackers to fetch from unintended internal services, including cloud metadata and localhost.

    • Adobe Experience Manager Forms (CVE-2025-54254): An Improper Restriction of XML External Entity Reference ('XXE') vulnerability that could lead to arbitrary file system read in Adobe AEM (≤6.5.23).

    Impact

    These vulnerabilities affect core infrastructure, from network security appliances like SonicWall to data platforms such as Apache Druid and ML frameworks like BentoML. The code execution and deserialization flaws are particularly severe, offering deep system access that allows attackers to steal data, disrupt services, and establish a foothold for broader intrusions. Simultaneously, SSRF and XXE vulnerabilities undermine network boundaries, exposing sensitive internal data and creating pathways for lateral movement. Beyond data-centric threats, flaws in edge devices like the Tenda router introduce the tangible risk of operational disruption, highlighting a multi-faceted threat to the security and stability of key enterprise systems.

    RulesetRule IDLegacy Rule IDDescriptionPrevious ActionNew ActionComments
    Cloudflare Managed Ruleset 100574SonicWall SMA - Remote Code Execution - CVE:CVE-2025-32819, CVE:CVE-2025-32820, CVE:CVE-2025-32821LogDisabledThis is a New Detection
    Cloudflare Managed Ruleset 100576Ms-Swift Project - Remote Code Execution - CVE:CVE-2025-50460LogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100585Apache Druid - Remote Code Execution - CVE:CVE-2023-25194LogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100834Tenda AC8v4 - Auth Bypass - CVE:CVE-2025-51087, CVE:CVE-2025-51088LogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100835Open WebUI - SSRF - CVE:CVE-2024-7959LogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100837SQLi - OOBLogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100841BentoML - SSRF - CVE:CVE-2025-54381LogDisabledThis is a New Detection
    Cloudflare Managed Ruleset 100841ABentoML - SSRF - CVE:CVE-2025-54381 - 2LogDisabledThis is a New Detection
    Cloudflare Managed Ruleset 100841BBentoML - SSRF - CVE:CVE-2025-54381 - 3LogDisabledThis is a New Detection
    Cloudflare Managed Ruleset 100845Adobe Experience Manager Forms - XSS - CVE:CVE-2025-54254LogBlockThis is a New Detection
    Cloudflare Managed Ruleset 100845AAdobe Experience Manager Forms - XSS - CVE:CVE-2025-54254 - 2LogBlockThis is a New Detection
  1. SSH with Cloudflare Access for Infrastructure now supports SFTP. It is compatible with SFTP clients, such as Cyberduck.

  1. You can now create more granular, network-aware Custom Rules in Cloudflare Load Balancing using the Autonomous System Number (ASN) of an incoming request.

    This allows you to steer traffic with greater precision based on the network source of a request. For example, you can route traffic from specific Internet Service Providers (ISPs) or enterprise customers to dedicated infrastructure, optimize performance, or enforce compliance by directing certain networks to preferred data centers.

    Create a Load Balancing Custom Rule using AS Num

    To get started, create a Custom Rule in your Load Balancer and select AS Num from the Field dropdown.

  1. Customers can now rely on Log Explorer to meet their log retention compliance requirements.

    Contract customers can choose to store their logs in Log Explorer for up to two years, at an additional cost of $0.10 per GB per month. Customers interested in this feature can contact their account team to have it added to their contract.

  1. Brand Protection detects domains that may be impersonating your brand — from common misspellings (cloudfalre.com) to malicious concatenations (cloudflare-okta.com). Saved search queries run continuously and alert you when suspicious domains appear.

    You can now create and save multiple queries in a single step, streamlining setup and management. Available now via the Brand Protection bulk query creation API.

  1. Earlier this year, we announced the launch of the new Terraform v5 Provider. We are aware of the high number of issues reported by the Cloudflare Community related to the v5 release. We have committed to releasing improvements on a two week cadence to ensure stability and reliability.

    One key change we adopted in recent weeks is a pivot to more comprehensive, test-driven development. We are still evaluating individual issues, but are also investing in much deeper testing to drive our stabilization efforts. We will subsequently be investing in comprehensive migration scripts. As a result, you will see several of the highest traffic APIs have been stabilized in the most recent release, and are supported by comprehensive acceptance tests.

    Thank you for continuing to raise issues. We triage them weekly and they help make our products stronger.

    Changes

    • Resources stabilized:
      • cloudflare_argo_smart_routing
      • cloudflare_bot_management
      • cloudflare_list
      • cloudflare_list_item
      • cloudflare_load_balancer
      • cloudflare_load_balancer_monitor
      • cloudflare_load_balancer_pool
      • cloudflare_spectrum_application
      • cloudflare_managed_transforms
      • cloudflare_url_normalization_settings
      • cloudflare_snippet
      • cloudflare_snippet_rules
      • cloudflare_zero_trust_access_application
      • cloudflare_zero_trust_access_group
      • cloudflare_zero_trust_access_identity_provider
      • cloudflare_zero_trust_access_mtls_certificate
      • cloudflare_zero_trust_access_mtls_hostname_settings
      • cloudflare_zero_trust_access_policy
      • cloudflare_zone
    • Multipart handling restored for cloudflare_snippet
    • cloudflare_bot_management diff issues resolves when running terraform plan and terraform apply
    • Other bug fixes

    For a more detailed look at all of the changes, refer to the changelog in GitHub.

    Issues Closed

    If you have an unaddressed issue with the provider, we encourage you to check the open issues and open a new one if one does not already exist for what you are experiencing.

    Upgrading

    We suggest holding off on migration to v5 while we work on stablization. This help will you avoid any blocking issues while the Terraform resources are actively being stablized.

    If you'd like more information on migrating to v5, please make use of the migration guide. We have provided automated migration scripts using Grit which simplify the transition. These migration scripts do not support implementations which use Terraform modules, so customers making use of modules need to migrate manually. Please make use of terraform plan to test your changes before applying, and let us know if you encounter any additional issues by reporting to our GitHub repository.

    For more info

  1. Implementations of the node:fs module and the Web File System API are now available in Workers.

    Using the node:fs module

    The node:fs module provides access to a virtual file system in Workers. You can use it to read and write files, create directories, and perform other file system operations.

    The virtual file system is ephemeral with each individual request havig its own isolated temporary file space. Files written to the file system will not persist across requests and will not be shared across requests or across different Workers.

    Workers running with the nodejs_compat compatibility flag will have access to the node:fs module by default when the compatibility date is set to 2025-09-01 or later. Support for the API can also be enabled using the enable_nodejs_fs_module compatibility flag together with the nodejs_compat flag. The node:fs module can be disabled using the disable_nodejs_fs_module compatibility flag.

    JavaScript
    import fs from "node:fs";
    const config = JSON.parse(fs.readFileSync("/bundle/config.json", "utf-8"));
    export default {
    async fetch(request) {
    return new Response(`Config value: ${config.value}`);
    },
    };

    There are a number of initial limitations to the node:fs implementation:

    • The glob APIs (e.g. fs.globSync(...)) are not implemented.
    • The file watching APIs (e.g. fs.watch(...)) are not implemented.
    • The file timestamps (modified time, access time, etc) are only partially supported. For now, these will always return the Unix epoch.

    Refer to the Node.js documentation for more information on the node:fs module and its APIs.

    The Web File System API

    The Web File System API provides access to the same virtual file system as the node:fs module, but with a different API surface. The Web File System API is only available in Workers running with the enable_web_file_system compatibility flag. The nodejs_compat compatibility flag is not required to use the Web File System API.

    JavaScript
    const root = navigator.storage.getDirectory();
    export default {
    async fetch(request) {
    const tmp = await root.getDirectoryHandle("/tmp");
    const file = await tmp.getFileHandle("data.txt", { create: true });
    const writable = await file.createWritable();
    const writer = writable.getWriter();
    await writer.write("Hello, World!");
    await writer.close();
    return new Response("File written successfully!");
    },
    };

    As there are still some parts of the Web File System API tht are not fully standardized, there may be some differences between the Workers implementation and the implementations in browsers.

  1. Static Assets: Fixed a bug in how redirect rules defined in your Worker's _redirects file are processed.

    If you're serving Static Assets with a _redirects file containing a rule like /ja/* /:splat, paths with double slashes were previously misinterpreted as external URLs. For example, visiting /ja//example.com would incorrectly redirect to https://example.com instead of /example.com on your domain. This has been fixed and double slashes now correctly resolve as local paths. Note: Cloudflare Pages was not affected by this issue.

  1. We've updated preview URLs for Cloudflare Workers to support long branch names.

    Previously, branch and Worker names exceeding the 63-character DNS limit would cause alias generation to fail, leaving pull requests without aliased preview URLs. This particularly impacted teams relying on descriptive branch naming.

    Now, Cloudflare automatically truncates long branch names and appends a unique hash, ensuring every pull request gets a working preview link.

    How it works

    • 63 characters or less: <branch-name>-<worker-name> → Uses actual branch name as is
    • 64 characters or more: <truncated-branch-name>--<hash>-<worker-name> → Uses truncated name with 4-character hash
    • Hash generation: The hash is derived from the full branch name to ensure uniqueness
    • Stable URLs: The same branch always generates the same hash across all commits

    Requirements and compatibility

    • Wrangler 4.30.0 or later: This feature requires updating to wrangler@4.30.0+
    • No configuration needed: Works automatically with existing preview URL setups
  1. Cloudflare Access logs now support the Customer Metadata Boundary (CMB). If you have configured the CMB for your account, all Access logging will respect that configuration.

  1. We are changing how Python Workers are structured by default. Previously, handlers were defined at the top-level of a module as on_fetch, on_scheduled, etc. methods, but now they live in an entrypoint class.

    Here's an example of how to now define a Worker with a fetch handler:

    Python
    from workers import Response, WorkerEntrypoint
    class Default(WorkerEntrypoint):
    async def fetch(self, request):
    return Response("Hello World!")

    To keep using the old-style handlers, you can specify the disable_python_no_global_handlers compatibility flag in your wrangler file:

    JSONC
    {
    "compatibility_flags": [
    "disable_python_no_global_handlers"
    ]
    }

    Consult the Python Workers documentation for more details.

  1. The recent Cloudflare Terraform Provider and SDK releases (such as cloudflare-typescript) bring significant improvements to the Workers developer experience. These updates focus on reliability, performance, and adding Python Workers support.

    Terraform Improvements

    Fixed Unwarranted Plan Diffs

    Resolved several issues with the cloudflare_workers_script resource that resulted in unwarranted plan diffs, including:

    • Using Durable Objects migrations
    • Using some bindings such as secret_text
    • Using smart placement

    A resource should never show a plan diff if there isn't an actual change. This fix reduces unnecessary noise in your Terraform plan and is available in Cloudflare Terraform Provider 5.8.0.

    Improved File Management

    You can now specify content_file and content_sha256 instead of content. This prevents the Workers script content from being stored in the state file which greatly reduces plan diff size and noise. If your workflow synced plans remotely, this should now happen much faster since there is less data to sync. This is available in Cloudflare Terraform Provider 5.7.0.

    resource "cloudflare_workers_script" "my_worker" {
    account_id = "123456789"
    script_name = "my_worker"
    main_module = "worker.mjs"
    content_file = "worker.mjs"
    content_sha256 = filesha256("worker.mjs")
    }

    Assets Headers and Redirects Support

    Fixed the cloudflare_workers_script resource to properly support headers and redirects for Assets:

    resource "cloudflare_workers_script" "my_worker" {
    account_id = "123456789"
    script_name = "my_worker"
    main_module = "worker.mjs"
    content_file = "worker.mjs"
    content_sha256 = filesha256("worker.mjs")
    assets = {
    config = {
    headers = file("_headers")
    redirects = file("_redirects")
    }
    # Completion jwt from:
    # https://developers.cloudflare.com/api/resources/workers/subresources/assets/subresources/upload/
    jwt = "jwt"
    }
    }

    Available in Cloudflare Terraform Provider 5.8.0.

    Python Workers Support

    Added support for uploading Python Workers (beta) in Terraform. You can now deploy Python Workers with:

    resource "cloudflare_workers_script" "my_worker" {
    account_id = "123456789"
    script_name = "my_worker"
    content_file = "worker.py"
    content_sha256 = filesha256("worker.py")
    content_type = "text/x-python"
    }

    Available in Cloudflare Terraform Provider 5.8.0.

    SDK Enhancements

    Improved File Upload API

    Fixed an issue where Workers script versions in the SDK did not allow uploading files. This now works, and also has an improved files upload interface:

    JavaScript
    const scriptContent = `
    export default {
    async fetch(request, env, ctx) {
    return new Response('Hello World!', { status: 200 });
    }
    };
    `;
    client.workers.scripts.versions.create('my-worker', {
    account_id: '123456789',
    metadata: {
    main_module: 'my-worker.mjs',
    },
    files: [
    await toFile(
    Buffer.from(scriptContent),
    'my-worker.mjs',
    {
    type: "application/javascript+module",
    }
    )
    ]
    });

    Will be available in cloudflare-typescript 4.6.0. A similar change will be available in cloudflare-python 4.4.0.

    Fixed updating KV values

    Previously when creating a KV value like this:

    JavaScript
    await cf.kv.namespaces.values.update("my-kv-namespace", "key1", {
    account_id: "123456789",
    metadata: "my metadata",
    value: JSON.stringify({
    hello: "world"
    })
    });

    ...and recalling it in your Worker like this:

    TypeScript
    const value = await c.env.KV.get<{hello: string}>("key1", "json");

    You'd get back this: {metadata:'my metadata', value:"{'hello':'world'}"} instead of the correct value of {hello: 'world'}

    This is fixed in cloudflare-typescript 4.5.0 and will be fixed in cloudflare-python 4.4.0.

  1. Cloudflare Logpush now supports IBM Cloud Logs as a native destination.

    Logs from Cloudflare can be sent to IBM Cloud Logs via Logpush. The setup can be done through the Logpush UI in the Cloudflare Dashboard or by using the Logpush API. The integration requires IBM Cloud Logs HTTP Source Address and an IBM API Key. The feature also allows for filtering events and selecting specific log fields.

    For more information, refer to Destination Configuration documentation.