Changelog
5.28.0 (2026-10-12)
⚠ BREAKING CHANGES
- api_shield_discovery_operation:
operation_idhas been renamed todiscovery_id,zone_idis now required, and the computedidattribute has been removed. Update resource arguments and any expressions referencingid. This resource remains deprecated and cannot be imported. No new state upgrader is included for these schema changes. - email_security_trusted_domains:
is_recent,is_regex, andis_similarityare now required instead of optional. Set all three explicitly, usingfalsefor protections that should not be bypassed. - registrar_domain, registrar_domains: the
cloudflare_registrar_domainresource and data source, and thecloudflare_registrar_domainslist data source, have been removed. Configurations using these types must be updated before upgrading; this release does not provide a replacement Terraform resource or data source. - zero_trust_dlp_custom_entry, zero_trust_dlp_entry, zero_trust_dlp_integration_entry, zero_trust_dlp_predefined_entry: the computed
word_listattribute is now a list of strings instead of a JSON-encoded string, on resources and their data sources. The same change applies to nestedword_listvalues in thezero_trust_dlp_custom_profileandzero_trust_dlp_predefined_profiledata sources. Removejsondecode(...)around these values and update expressions expecting a string. No new state upgrader is included for this type change. - zero_trust_organization:
mfa_ssh_piv_key_requirementshas been replaced withmfa_piv_key_requirementson the resource and data source, restoring the field name accepted by the API. Rename the argument and any references to it; the nested attributes are unchanged. No new state upgrader is included for this rename. This also restores API serialization and empty-list normalization, so PIV requirements use the correct API field name and empty SSH key lists do not cause perpetual diffs.
Notes
- pages_project: the API documentation now clarifies that build image version 1 is retired and affected projects are moved to version 3. Once a project's builds have moved, requests setting
deployment_configs.preview.build_image_major_versionordeployment_configs.production.build_image_major_versionto 1 are rejected. Use version 3 for those projects. - zero_trust_device_custom_profile: the read-only
target_testsattribute is deprecated on the resource and its data sources. - zero_trust_dlp_custom_entry, zero_trust_dlp_entry, zero_trust_dlp_integration_entry, zero_trust_dlp_predefined_entry: the computed
deprecatedattribute no longer defaults tofalse.
Features
New Resources
- cloudflare_monetization_rules: manage a zone's Payment Required ruleset, including
exact,upto, andorigin_controlledpayment schemes. Supportsterraform importusing the zone ID.
New Data Sources
- cloudflare_monetization_rules: read a zone's Payment Required ruleset.
New Attributes
- ai_search_instance, ai_search_instances:
metadata.created_from_emdash_plugin, withtype(nativeorrest) andversion. - pages_project, pages_projects: read-only
build_image_auto_upgrade.from_versionandbuild_image_auto_upgrade.to_version, identifying projects moved from a retired build image. - worker_version, worker_versions, workers_script: Durable Object binding retry settings,
bindings.retry.max_attemptsandbindings.retry.timeout_ms.max_attemptscounts retries after the initial request and accepts 0–10; zero disables retries.timeout_msaccepts 500–60000 and controls the retry window, not the initial-request timeout. - workers_kv_namespace, workers_kv_namespaces:
mode; setmode = "instant"when creating a namespace to use KV Instant, or omit it for a classic namespace. Changing the resource's mode forces replacement. - workers_script:
bindings_inherit = "strict"makes uploads fail when an inherited binding cannot be resolved, instead of silently dropping that binding. - zero_trust_access_application, zero_trust_access_applications:
target_criteria.include,target_criteria.require, andtarget_criteria.exclude, supporting hostname and tag selectors for infrastructure targets. The rule format requiresinclude;requireandexcludeare optional. Each rule must contain a hostname selector or tags, with selector sizes and empty values validated at plan time. The legacytarget_criteria.target_attributesformat remains supported for unchanged persisted maps, including non-hostname keys. For new or changed criteria, prefer the rule format. The legacy format and rule format cannot be combined in the same criterion. - zero_trust_access_identity_provider, zero_trust_access_identity_providers:
config.login_page_auto_prompt, defaulting tofalseon the resource, to automatically prompt for passkey authentication on the Access login page. - zero_trust_gateway_certificate, zero_trust_gateway_certificates: read-only
region, identifying where the certificate authority's key material is pinned. - zero_trust_resource_library_application, zero_trust_resource_library_applications:
lookupquery support for finding complete application name mentions in a phrase. Usefilter.lookupon the singular data source orlookupon the list data source. It cannot be combined withsearch.
New Accepted Values
- zero_trust_access_application:
session_durationis now supported for infrastructure applications and defaults to24h, fixing creation failures when the API returns this default. It sets the maximum connection duration and must uses,m, orhin whole seconds. - zero_trust_access_identity_provider:
typeacceptspasskeys. - zero_trust_device_custom_profile:
matchexpressions supportdevice.tags.
Bug Fixes
- d1_database: make
read_replicationoptional and computed with a nested custom type, allowing API-returned replication settings to populate state when the block is omitted. - dns_record: default missing
include_shadow_metadatatofalseduring refresh and v4 to v5 migration, avoiding spurious updates for older state. Allowmodified_onto change whenprivate_routingorinclude_shadow_metadatachanges, preventing inconsistent-result errors after updates. - hostname_tls_setting: populate the required
setting_idduring import, so imported hostname TLS settings can be refreshed and managed. - pages_domain, r2_data_catalog, stream_caption_language, stream_download, stream_key, zero_trust_access_short_lived_certificate: stop sending JSON request bodies to API operations that do not accept a body.
- pages_project, workers_kv_namespace, workers_script, zero_trust_access_application, zero_trust_access_identity_provider, zero_trust_gateway_certificate: add newly introduced attributes to the v500 migration target models so existing state upgraders match the current schemas.
- ruleset: improve legacy v4 state detection and migration at schema versions 0 and 1, including nested blocks, retired metadata, and v4.52.9
content_converterfields. Preserve configuredcontent_convertervalues and existing v5 state, including rules managed withlifecycle.ignore_changes. - worker: preserve changes made only to
previews_base_config, including configuration-derived unknown values, so preview-only updates do not incorrectly retain the previousupdated_onvalue or suppress the planned change. - workers_script: prefer the API's
CF-Entrypointheader when refreshing multipart script content, allowing renamed entrypoints to surface as drift instead of failing to find a stale module name. Preserve service-workerbody_partformat during refresh. - zero_trust_access_application: clear prior target criteria before decoding refresh responses, so removed rules and selectors become null instead of retaining stale objects in state.