Skip to content

chore(deps): update terraform cloudflare to v5 - #1836

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/cloudflare-5.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/cloudflare-5.x

Conversation

@renovate

@renovate renovate Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Type Update Change
cloudflare (source) required_provider major ~> 4.46 → ~> 5.0
cloudflare (source) required_provider major ~>4.46 → ~> 5.0

Release Notes

cloudflare/terraform-provider-cloudflare (cloudflare)

v5.27.0

Compare Source

Full Changelog: v5.26.0...v5.27.0

⚠ BREAKING CHANGES

One change requires a configuration edit. The rest of this release's schema movement is read-only reshaping with no action required — see Schema Changes at the end.

  • api_shield_operation: the feature and with_schemas attributes have been removed from the resource. They were never resource state — both are read-shaping query parameters on the list/get endpoints, and there is no create or update endpoint that accepts them. Remove them from any cloudflare_api_shield_operation block; leaving them in place produces an "Unsupported argument" error. The schema version moves from 500 to 501 and an automatic state upgrader strips both fields from existing state, so no manual state editing is required. This also fixes the .with_schemas: was cty.False, but now null error raised when upgrading from v5.26.0.
Notes
  • magic_transit_site: changing ha_mode no longer forces replacement. The upstream API added update support, so the site is modified in place.
  • magic_transit_site_lan: changing ha_link no longer forces replacement, for the same reason.
  • magic_transit_site_wan: health_check_rate is now configurable (previously read-only).
  • ai_search_instance: hybrid_search_enabled now reflects the API default of true for newly created instances. Existing instances keep the value already in state, so upgrading does not plan a change.
  • zone_dns_settings: nameservers.ns_set is now computed. It applies only to custom nameserver types and is preserved from state when the API does not return it.
  • zone_dns_settings: foundation_dns is deprecated and will be removed in a future API version. Set nameservers.type to cloudflare.advanced to turn Advanced Nameservers on, or cloudflare.standard to turn it off.
  • ai_gateway: the default for spend_limits.rules.id changed from 865b4d33 to 00000000. Configurations that do not set id explicitly will show a one-time diff on the next plan.
  • zero_trust_device_custom_profile: changing an explicitly configured profile_type now forces replacement. The field is set when the profile is created and cannot be changed, so an in-place update was never possible. Configurations that omit profile_type are unaffected.
Features
New Resources
  • cloudflare_zero_trust_casb_integration: Zero Trust CASB Integration
New Data Sources
  • cloudflare_zero_trust_casb_integration: Zero Trust CASB Integration
  • cloudflare_zero_trust_casb_integrations: Zero Trust CASB Integrations (list)
New Attributes
  • magic_transit_site_wan: load_balance_inner_flows
  • zero_trust_organization: strict_service_token_auth
  • zone_dns_settings: nameservers.nameserver_set_id
  • ai_search_instance, ai_search_instances: hostname filter
  • account_api_token_permission_groups, account_api_token_permission_groups_list, api_token_permission_groups_list: category and is_selectable
New Accepted Values
  • flagship_flag: rules.conditions[...].operator accepts has and not_has
  • pipeline_sink: type accepts basin_catalog
  • worker_version: bindings.type accepts artifacts
  • workers_script: bindings.type accepts artifacts, flagship, k2 and messaging
  • zone_dns_settings: nameservers.type accepts cloudflare.advanced and custom
Other
  • bump cloudflare-go to v7.12.0
  • calls_turn_app: add support for terraform import
  • zero_trust_casb_policy: reject at plan time configurations where applies_to_all_integrations is false and no integration IDs resolve. Existing policies that omit integration_ids and retain IDs in state continue to plan normally.
Bug Fixes
  • api_shield: add missing normalize field to v500 migration target model
  • bot_management: wire up AI Crawl Control fields in hand-maintained API plumbing
  • bot_management: wire ai_bots_migration_opt_out into the API model
  • calls_turn_app: populate key_id from the API's uid after create, so plan, refresh, update and destroy no longer fail with "missing required key_id parameter"
  • d1_database: add missing fields to the v500 migration target model
  • dns_record: default include_shadow_metadata to false on import
  • logpush_dataset_field: deserialize the fields result map
  • logpush_job: add decode_null_to_zero to filter_attack_traffic
  • notification_policy: add missing token_id to the v500 migration target model
  • observatory_scheduled_test: require replacement when frequency or region change, as the API has no update endpoint for scheduled tests
  • page_rule: send the API's query_string wildcard
  • schema_validation_schemas: default omit_source to false on import
  • snippet_rules: remove stale and spurious top-level fields from the migration target model
  • turnstile_widget: default page/per_page to their spec values on import
  • worker: remove observability.redact_query_string
  • worker, worker_version: backfill author fields on create
  • worker_version: exclude exports_reconciliation from the v0 legacy schema
  • worker_version: add missing V0 fields to fix a migration test panic
  • workers_kv: add missing expiration/expiration_ttl to the v500 migration target model
  • workers_script: add missing base_path and observability.issues attributes
  • workers_script: add missing stream attribute to the bindings schema
  • workers_script: add missing force field to the legacy V0 migration struct
  • zero_trust_access_ai_controls_mcp_server: only send changed fields on update, so unrelated changes no longer resend and rotate client_secret; redact auth_credentials and client_secret from debug logs
  • zero_trust_access_mtls_hostname_settings: import now takes an explicit accounts/<account_id> or zones/<zone_id> prefix. Account and zone IDs are both 32-character hex, so the previous length-based detection always resolved to account scope and zone-scoped resources could not be imported.
  • zero_trust_device_custom_profile: stop split tunnel entries inheriting a mutually exclusive field from state, which caused "host and Address both cannot be present" API errors
  • zero_trust_organization: add warp_auth_non_browser_401 to the v4 source model, unblocking v4 to v5 migration
  • zero_trust_organization: ignore mfa_configuration_allowed/service_token_inactivity on import
  • zero_trust_organization: normalize mfa_configuration_allowed, service_token_inactivity, trusted_accounts
  • zero_trust_organization: fix refresh-plan instability for 4 attributes
  • zero_trust_tunnel_warp_connector: restore ha from metadata.ha on import and read
Schema Changes (no action required)

Upstream Cloudflare API schema changes picked up via the cloudflare-go v7.12.0 bump. These are listed for completeness; none require a change to a working configuration.

Of the 54 removed attributes, 52 are read-only (computed): existing state files load without user action and plans are unaffected, so only configurations that reference them — in an output block or an expression — need updating. The two attributes that become Required were already mandatory server-side, so a request omitting them was always rejected; the failure simply moves from apply time to plan time. The one type change is on data sources only, and HCL converts numeric strings automatically.

  • account_member, account_members, account_permission_group, account_permission_groups, account_token, account_tokens, api_token, api_tokens, user_group, user_groups: the generic policies.permission_groups.meta.key / .value pair has been replaced with typed fields — category, deprecated, description, editable, eol_at, label, scopes, visibility. Expressions reading meta.key/meta.value must move to the named field.
  • hyperdrive_config, hyperdrive_configs: integration.integration has been renamed to integration.hyperdrive_config_provider.
  • queue, queues, queue_consumer, queue_consumers: the read-only settings.email, settings.pagerduty and settings.webhooks detail attributes are no longer surfaced on the cloudflare_queue resource or the queue data sources. Relatedly, notification is no longer an accepted value for the read-only consumers.type attribute on those surfaces. Queue configuration is unaffected — the cloudflare_queue_consumer resource is unchanged and still accepts and manages all three settings blocks.
  • cloud_connector_rules: rules is now Required instead of Optional. The API already rejects a request that omits it, so this moves the failure from apply time to plan time rather than breaking a working configuration.
  • zone_dns_settings: nameservers.type is now Required instead of Optional. nameservers became a discriminated union upstream and type is its discriminator, so it was already mandatory in practice.
  • flagship_flag, flagship_flags: limit changed from String to Int64 and is now constrained to between 1 and 200. These are data sources only, so there is no state to migrate, and HCL converts numeric strings automatically — limit = "10" continues to work.

v5.26.0

Compare Source

Full Changelog: v5.25.0...v5.26.0

Features
New Resources
  • cloudflare_field_extractor: Field Extractor
  • cloudflare_magic_wan_bgp_filter_profile: Magic WAN BGP Filter Profile
  • cloudflare_zero_trust_casb_policy: Zero Trust CASB Policy
  • cloudflare_zero_trust_casb_webhook: Zero Trust CASB Webhook
  • cloudflare_zero_trust_connectivity_settings: Zero Trust Connectivity Settings
  • cloudflare_zone_tracing: Zone Tracing
  • cloudflare_zone_tracing_rules: Zone Tracing Rules
New Data Sources
  • cloudflare_field_extractor: Field Extractor
  • cloudflare_magic_wan_bgp_filter_profile: Magic WAN BGP Filter Profile
  • cloudflare_magic_wan_bgp_filter_profiles: Magic WAN BGP Filter Profiles (list)
  • cloudflare_zero_trust_casb_policy: Zero Trust CASB Policy
  • cloudflare_zero_trust_casb_policies: Zero Trust CASB Policies (list)
  • cloudflare_zero_trust_casb_webhook: Zero Trust CASB Webhook
  • cloudflare_zero_trust_casb_webhooks: Zero Trust CASB Webhooks (list)
  • cloudflare_zero_trust_connectivity_settings: Zero Trust Connectivity Settings
  • cloudflare_zone_tracing: Zone Tracing
  • cloudflare_zone_tracing_rules: Zone Tracing Rules
New Attributes
  • cloudflare_magic_wan_gre_tunnel, cloudflare_magic_wan_ipsec_tunnel
    • bgp.import_filter_id: ID of the BGP filter profile applied to routes received from the customer
    • bgp.export_filter_id: ID of the BGP filter profile applied to routes advertised to the customer
Bug Fixes
  • custom_ssl: mark private_key optional to unblock setting custom_csr_id
  • email_routing_settings: add missing support_subaddress to resource schema
  • load_balancer_monitor: correctly resolve ambiguous version-zero state during v4 to v5 migration
  • page_rule: raise edge_cache_ttl maximum to allow one-year values
  • provider: send user_agent_operator_suffix unquoted and read fallback from environment variable
  • ruleset: normalize legacy query string wildcards during v4 to v5 migration
  • zone_lockdown: drop UseNonNullStateForUnknown on created_on to prevent perpetual diff

v5.25.0

Compare Source

Full Changelog: v5.24.0...v5.25.0

Features
New Resources
  • cloudflare_email_security_allow_policy: Cloud Email Security Allow Policy
  • cloudflare_email_security_domain: Cloud Email Security Domain
  • cloudflare_email_sending_subdomain: Email Sending Subdomain
  • cloudflare_nel_setting: Network Error Logging Zone Setting
  • cloudflare_zero_trust_resource_library_application: Zero Trust Resource Library Application
New Data Sources
  • cloudflare_email_security_allow_policy: Cloud Email Security Allow Policy
  • cloudflare_email_security_allow_policies: Cloud Email Security Allow Policies (list)
  • cloudflare_email_security_domain: Cloud Email Security Domain
  • cloudflare_email_security_domains: Cloud Email Security Domains (list)
  • cloudflare_email_sending_subdomain: Email Sending Subdomain
  • cloudflare_email_sending_subdomains: Email Sending Subdomains (list)
  • cloudflare_nel_setting: Network Error Logging Zone Setting
  • cloudflare_spectrum_protocols: Spectrum Protocols (list)
New Attributes
  • cloudflare_ai_search_instance
    • aisearch_model: Workers AI model for AI search queries
    • embedding_model: Model used to generate text embeddings
    • reranking_model: Model used to rerank search results
    • rewrite_model: Workers AI model for query rewriting
    • summarization_model: Model used to summarize search results
  • cloudflare_bot_management
    • bot_preference_sync_enabled: Sync bot preferences from AI Search, AI User, and AI Training zone settings
  • cloudflare_content_scanning_expression
    • payload: Custom content extraction expression to locate content objects in requests
  • cloudflare_email_routing_dns
    • support_subaddress: Whether plus-addressing is honored when matching routing rules
  • cloudflare_magic_transit_connector
    • primary: Whether this connector is the primary connector for the site
    • site_id: Identifier of the Magic Transit site this connector belongs to
  • cloudflare_oauth_client
    • optional_scopes: Scopes a user may decline during OAuth consent
  • cloudflare_organization
    • account_creation_applies_tenant_defaults: Whether tenant defaults apply to newly created accounts
  • cloudflare_pipeline_sink
    • format: Output data format configuration for the sink
    • schema: Schema definition for events in the data stream
  • cloudflare_pipeline_stream
    • format: Data format configuration for stream events
    • schema: Schema definition for events in the data stream
  • cloudflare_ruleset
    • origin_range_requests: Fetch large origin assets as a series of range requests
    • vary: Cache variation key configuration for set_cache_settings action
  • cloudflare_stream_live_input
    • playback: HLS and DASH manifest URLs for live stream playback
  • cloudflare_worker_version
    • identity: Enables Gateway identity for network bindings
  • cloudflare_workers_kv_namespace
    • jurisdiction: Restrict KV data storage to a specific jurisdiction at creation time
  • cloudflare_workers_script
    • files: Multipart WASM modules and binary files included in the Worker upload
  • cloudflare_workflow
    • concurrency: Concurrency limit and active instance count for the workflow
  • cloudflare_zero_trust_access_group
    • account_id: Account that owns the device posture integration (in posture sub-rules)
  • cloudflare_zero_trust_access_identity_provider
    • force_authn: Asks the IdP to reauthenticate on each SAML request
    • max_sso_url_length: Maximum URL length accepted for SSO redirect
Bug Fixes
  • bot_management: mark bot_preference_sync_enabled optional-only; Computed caused "unknown after apply" errors
  • custom_pages: Update causing inconsistent apply results
  • email_routing_dns: data source not returning any data (#​7130)
  • email_security_block_sender: mark account_id as required in data sources
  • image: fix create/update marshaling errors
  • magic_transit_connector: add missing primary and site_id fields; mark account_id as required in data sources
  • registrar_domain: mark account_id as required in list data source
  • worker_version: correct response binding order to prevent plan drift (#​7115)
  • set schema Version: 500 on new resources to enable correct state upgrade path

v5.24.0

Compare Source

Full Changelog: v5.23.0...v5.24.0

BREAKING CHANGES

The following upstream API schema changes required corresponding provider schema updates. Existing state files load without user action (the plugin framework silently drops attributes that no longer exist in the schema), but Terraform configurations that still reference removed attributes must be updated before terraform plan will succeed.

  • hostname_tls_setting: the cloudflare_hostname_tls_setting data source now requires hostname as an input parameter instead of returning it as a computed attribute. The computed id attribute has been removed; use setting_id instead. (ece27fe)
  • image_variant: the computed variant nested attribute has been removed. The API no longer returns this wrapper object; the id, options, and never_require_signed_urls fields remain available at the top level. Remove any references to cloudflare_image_variant.<name>.variant from your configurations. (738bd28)
  • organization: the computed meta.flags nested attribute has been renamed to meta.tenant_flags. Two new computed sub-attributes (enterprise_capability, member_management) have been added. Update any references from .meta.flags to .meta.tenant_flags. (ece27fe)
  • zero_trust_access_ai_controls_mcp_portal: the allow_code_mode attribute is now deprecated and no longer computed with a default of true. Use the new code_mode attribute ("off", "opt_in", "default_on", "enforced") instead. Configurations that relied on the computed default must explicitly set code_mode or allow_code_mode. (ece27fe)
  • zero_trust_access_policy: the session_duration attribute is no longer computed with a default of "24h". It is now optional-only. Existing configurations that omitted session_duration and relied on the provider default will see a plan diff; explicitly set session_duration = "24h" to preserve the previous behavior. (ae4f5a1)
  • zero_trust_organization: the allowed_authenticators enum value ssh_piv_key has been renamed to piv_key, and a new value ssh_fido2_key has been added. Configurations using "ssh_piv_key" must be updated to "piv_key". (ece27fe)
  • zero_trust_resource_library_application: the id attribute type changed from String to Int64. The computed intel_id attribute has been removed. The hostnames, ip_subnets, port_protocols, support_domains, and supported attributes changed from List to Set (element ordering is no longer significant). These changes apply to both the resource data source and the list data source. (ece27fe)
  • zero_trust_resource_library_category: the id attribute type changed from String to Int64 on both the data source and list data source. (ece27fe)
  • zero_trust_tunnel_cloudflared: the computed is_pending_reconnect attribute has been removed from connections. The upstream API no longer returns this field. Remove any references to connections[*].is_pending_reconnect from your configurations. (ece27fe)
  • zero_trust_tunnel_warp_connector: the computed is_pending_reconnect attribute has been removed from connections, matching the zero_trust_tunnel_cloudflared change above. (ece27fe)
New Resources
  • cloudflare_ct_alerting: onboard new Terraform resource for Certificate Transparency alerting (ece27fe)
  • cloudflare_precursor: onboard new Terraform resource for Precursor (ece27fe)
New Data Sources
  • cloudflare_hostname_tls_settings: add list data source for hostname TLS settings (ece27fe)
Features
  • bump Go SDK version to v7.9.0 (79c7d4f)
  • ai_gateway: add log_classification attribute and unified billing mode (ece27fe)
  • ai_search_instance: add discover_options for link-following web crawler configuration (ece27fe)
  • ai_search_namespace: add public_endpoint_params with MCP, rate limiting, custom domains, and chat completions configuration (ece27fe)
  • cloud_connector_rules: add oci_storage cloud provider type (ece27fe)
  • d1_database: add us location restriction value (ece27fe)
  • load_balancer_pool: add health_sources attribute for regional health steering (ece27fe)
  • ruleset: add vary parameter to set_cache_settings action (e9cdc20)
  • waiting_room: add Latvian (lv-LV) language support (ece27fe)
  • worker: add preview_url_suffix and url computed attributes to subdomain block (ece27fe)
  • worker_version: add messaging binding type (ece27fe)
  • zero_trust_access_ai_controls_mcp_portal: add code_mode attribute for granular Code Mode policy control (ece27fe)
  • zero_trust_access_ai_controls_mcp_server: add authentication_status computed attribute (ece27fe)
  • zero_trust_access_application: add worker destination types for Access (118fe39)
  • zero_trust_access_custom_page: add contract_version, warnings, and new type values (login, interstitial) (ece27fe)
  • zero_trust_access_service_token: add enabled attribute to control service token activation (ece27fe)
  • zero_trust_dlp_*_entry: add computed deprecated attribute to all DLP entry resources and data sources (ece27fe)
  • zero_trust_organization: add warp_auth_non_browser_401 attribute for non-browser 401 responses (ece27fe)
  • zone_setting: add webmcp_enabled and webmcp_packs setting IDs (ece27fe)
Bug Fixes
  • guard against nil pointer dereference in dynamic semantic equality (d82bbd5)
  • image_variant: fix nested variant response deserialization (738bd28)
  • port v5.23.0 regression fixes from GitHub main (ae4f5a1)
  • remove duplicate declarations causing build failures (dc360d2)
Documentation
  • image_variant: update resource documentation (bab4b71)
  • regenerate provider documentation (79c7d4f)
  • restore .md extensions on internal guide cross-links (f51c9d6)

v5.23.0

Compare Source

Full Changelog: v5.22.0...v5.23.0

New Data Sources
  • cloudflare_zero_trust_dlp_custom_prompt_topic: add data source for DLP custom prompt topics (ae6a505)
  • cloudflare_zero_trust_dlp_custom_prompt_topics: add list data source for DLP custom prompt topics (ae6a505)
Features
  • bump Go SDK version to v7.8.0 (ae6a505)
  • hyperdrive_config: add v4 to v5 state migration (cdd5ca6)
  • turnstile_widget: add deployed_via and last_modified_via computed fields, and default offlabel to false (5952e95)
  • zero_trust_device_default_profile: add global_acceleration block for configuring custom tunnel and API endpoints (5952e95)
  • zero_trust_gateway_policy: add delete_headers support in request header modification settings (5952e95)
Bug Fixes
  • d1_database: initialize read_replication in state upgrader to prevent 400 error (298799b)
  • load_balancer_pool: preserve origins order to prevent perpetual drift (aad09cc)
  • zero_trust_access_ai_controls_mcp_portal: migrate servers state from list to set (9766b3a)
  • zero_trust_access_policy: resolve perpetual diff by calling normalization in CRUD (497f06b)
  • zero_trust_device_custom_profile: resolve perpetual drift on default, include, target_tests, and exclude nested attributes (f74cecf)
  • zero_trust_device_custom_profile: address review feedback on normalization (969b35d)
  • zero_trust_dex_test: remove stale model fields that caused value conversion panics during resource operations (fd43d83)
  • zero_trust_organization: normalize mfa_required_for_all_apps to prevent perpetual diff (001c28e)
  • workers_custom_domain: populate computed fields from a post-create read to prevent import drift (fd43d83)
  • pages_project: fix source.config drift for API-populated fields by preserving computed state values (c63f15e)
Chores
  • add .terraform-registry for ownership transfer (d33bc90)
  • internal: codegen related update (ae6a505)
Documentation
  • add workers_secret migration guidance with tf-migrate support (524b26a)
  • fix account_subscription examples (2ebc7db)
  • migration-guide: add table of contents to v5 migration guide (e11e8a4)
  • regenerate provider documentation (4656c9f)
  • resolve AI review doc warnings (691131e)

v5.22.0

Compare Source

Full Changelog: v5.21.1...v5.22.0

⚠ BREAKING CHANGES

The following upstream API schema changes required corresponding provider schema updates. Existing state files load without user action (the plugin framework silently drops attributes that no longer exist in the schema), but Terraform configurations that still reference removed attributes must be updated before terraform plan will succeed.

  • ai_search_instance: the source_params.web_crawler.crawl_options block has been removed. Cloudflare's AI Search API dropped this field from its public schema in June 2026 and no longer accepts it, so keeping it in the provider would surface as a runtime API error rather than a plan-time error. Remove any crawl_options { ... } block from your cloudflare_ai_search_instance configurations. (0843c7f)
  • zero_trust_access_ai_controls_mcp_portal: the servers attribute changed from a list to a set. HCL syntax is unchanged (servers = [ ... ]), but element ordering is no longer significant — Terraform will no longer plan a change when only the order of servers entries differs, and any code that relied on stable list ordering (e.g. element(..., 0)) may need to be updated. (099fc24)
Notes
  • managed_transforms: managed_request_headers and managed_response_headers are now Optional instead of Required. Existing configurations that set both blocks keep working unchanged; you may now omit either block if you don't need to manage those transforms. (928173)
New Resources
  • cloudflare_moq_relay: onboard new Terraform resource for Media over QUIC (MoQ) relays (9f2678c)
Features
  • d1_database: add v4-to-v5 state upgrader (32f42b1)
  • d1_database: add CRUD acceptance tests (3491e69)
  • hyperdrive_config: add comprehensive acceptance tests (59399bb)
  • oauth: add oauth_client resource CRUD support (154668f)
  • workers_custom_domain: add acceptance tests for resource, data sources, and import (26e0092)
  • workers_script: add exports and package_dependencies to schema (c15cef1)
  • zero_trust_access_application: add file as valid RDP connection_rules value (2659e30)
  • zero_trust_access_short_lived_certificate: add MoveState handler for access_ca_certificate rename (v4 -> v5 auto-migration) (90f3324)
Bug Fixes
  • dns_record: dedupe schema key and drop unused import (8faa422)
  • dns_record: revert Meta model to jsontypes.Normalized to match schema (c0eea18)
  • docs: add .md extension to migration guide links (7546f3e)
  • hyperdrive_config: address review feedback (92ce892)
  • load_balancer_pool: remove phantom flatten_cname from v4 source model (baa1b92)
  • migration: correct v4 test configs and migration test harness for access_ca_certificate (2c47cf7)
  • moq_relay: add schema Version: 500 (890b9f9)
  • oauth: remove custom oauth visibility change (6b4a0ed)
  • ruleset: add asset_name to v4 source schema so v4->v5 state upgrader parses correctly (baa1b92)
  • worker_version: add CustomType to assets schema to match model (7e7e0d3)
  • worker_version: use NestedObject accessors for Assets field (78d419f)
  • workers_custom_domain: address review feedback (3271949)
  • workers_script: resolve duplicate cache_options tag (c15cef1)
  • zero_trust_list: handle ambiguous schema_version=0 state (v4 vs v5) (c010f78)
Chores
  • api: force regen of moq_relay and email_routing_rule (a9e500a)
  • ci: add 30m timeout to unit test shards (635637b)
  • ci: trigger acceptance tests on release-tf-* branches (5921d00)
  • go.mod: pin cloudflare-go to release-770 branch head for v5.22.0 (05272f3)
  • internal: codegen related update (c7a96ca)
  • use 'next' for Terraform builds (30c04e6)
Documentation
  • list: fix missing comma in resource and data source examples (bfe1c34)
  • regenerate provider docs; fix provider address and .stats.yml (cbde062)
  • update documentation for moved blocks to Terraform 1.8 (d93208d)
  • v5-migration: document session_duration behavior change for access policies (90c58a7)
  • v5-upgrade: add destructive-behavior warning for app-scoped policy migration (1e832d6)
  • v5-upgrade: document zone_id removal for access policies (831f0bb)

v5.21.1

Compare Source

Full Changelog: v5.21.0...v5.21.1

Bug Fixes
  • worker: stop sending propagation_policy when not configured (#​7192) (31d9a31)

v5.21.0

Compare Source

Full Changelog: v5.20.0...v5.21.0

Features
  • add new resources from staging-next (e104922)
Bug Fixes
  • add missing no-op state upgraders for version 0 -> 500 (692a0c6), closes #​7181
  • restore account_id and zone_id as required on 156 resources (62024cf)
  • workers_script: add missing propagation_policy to observability traces schema (78448d8)
  • zone: only sweep zones containing the cftftest prefix (293ab21)
Chores
  • Add acceptance tests for DLP data classification resources (b85f20c)
  • ci: optimize CI workflow runtime (7aa373f)
  • clean up (e36c8a3)
Documentation
  • add docs for v5.20.1 release (712db1d)

v5.20.0

Compare Source

Full Changelog: v5.19.1...v5.20.0

Features
  • add 11 new resources/data-sources from staging-next (faab405)
  • add acceptance tests for google_tag_gateway resource (f89e15f)
  • add acceptance tests for virtual_networks on zero_trust_device_custom_profile (0625153)
  • add state upgraders for email_security_block_sender + impersonation_registry (bc22174)
  • chore: skip failing deployment_groups tests (614c726)
  • chore: skip failing Go SDK tests for workers bulk secret update (69d2591)
  • chore: use cloudflare-go v7.5.0 in Terraform build (fd1ab3e)
  • chore: use released Go SDK for Terraform build (e31d0f5)
  • chore: use released Go SDK for Terraform build (858be78)
  • feat: add custom_csrs Stainless config (zone + account) (0c37d4f)
  • feat: add custom_csrs Stainless config (zone + account) (408836e)
  • feat: add resource library endpoints inside zero trust (8f71612)
  • feat: move google_tag_gateway terraform resource from staging to production (b4f6126)
  • feat(api): add zero_trust_device_deployment_groups resource (3de6e62)
  • feat(api): add zero_trust_device_deployment_groups resource (c852320)
  • feat(cache): add create (POST) method for smart_tiered_cache (26568ea)
  • feat(cache): Update OPCR config to v2 endpoints (CACHE-13523) (278c81f)
  • feat(dex): add device ISPs endpoint mapping (4c7ad2c)
  • feat(dlp): add custom prompt topics endpoint [production] (7732fd9)
  • feat(dlp): add custom prompt topics endpoint [production] (305dab6)
  • feat(dlp): promote classification Stainless config to main (d8803bd)
  • feat(flagship): add Flagship feature flag API resource mappings (2b149cf)
  • feat(resource_sharing): add Terraform resource definitions for shares (d83b268)
  • feat(snippets): add terraform id_property annotations for snippet and snippet_rules (1781d02)
  • fix(iam): remove standalone_api from oauth_scopes subresource (8af9cd0)
Bug Fixes
  • account_member: missing upgrade path from v5.0-v5.15 (d5c2a93)
  • add no-drift plan checks and domain precheck (e4eaf52)
  • add read_only field to identity provider migration target model (ac4ec4f)
  • align migration target models + schemas to fix parity tests (f5ea496)
  • authenticated_origin_pulls_settings: nil pointer panic (cf8099b)
  • bot_management: restore content_bots_protection handling in model.go (d559753)
  • derive zone name from Read instead of missing API field (0d5feef)
  • dns_record: prevent FQDN normalization from swallowing name shortening changes (2131622)
  • email_security_trusted_domains: align model JSON tags with Optional schema (5ee457f)
  • email: missed Optional revert + email_security_trusted_domains state upgrader (8f3ddad)
  • gracefully handle nil pointer dereference when config has attributes_flat during migration (589384d)
  • leaked_credential_check_rule: skip tests that require product enablement (fc2d109)
  • list: nullify empty nested objects to prevent inconsistent result after apply (7bcee4b)
  • load_balancer_pool: accept early-v5 object-shape state at schema_version=0 (23050e1), closes #​7098
  • load_balancer_pool: add UseStateForUnknown for load_shedding attribute to prevent drift (3fc31ee)
  • r2_custom_domain: restore degraded-response handling in resource.go (b3d01a0)
  • regional_hostname: update cloudflare-go imports from v6 to v7 (d4211c4)
  • register regional_hostname in provider.go (3a87345)
  • resolve pre-existing v6/v7 and codegen-drift build errors (27aed32)
  • restore handwritten code stripped from staging-next codegen for acceptance tests (6920a59)
  • restore production files lost to codegen drift on staging-next (1bba117)
  • restore site_id/queue_id path tags to 'required' in data source models (56b6a34)
  • secrets_store: fix model/schema parity and guard acceptance tests (dde9b24)
  • set initial schema version to 500 for all new resources (ef71ba4)
  • spectrum_application: accept early-v5 object-shape state at schema_version=0 (bdcaa79), closes #​7098
  • tests: bump v6→v7 imports in restored hand-written tests (4cf7eff)
  • treeshaking required fields from optional (94198f3)
  • undo two over-corrections from previous batch (08a3561)
  • update go.sum and fix RecipientNewParams field rename (931cb9f)
  • worker_version: restore handwritten D1 database_id handling (ed78cd0)
  • worker: add propagation_policy to grandparent observability Default (c815f52)
  • worker: include propagation_policy in observability.traces parent Default + update data source test (541fe77)
  • worker: preserve observability.traces.propagation_policy across reads (458854e)
  • workers_custom_domain: Missing CertId field in state migration (17d852f)
  • workers_script: restore annotations Computed + workers_triggered_by (d3d033a)
  • workers_script: restore annotations Read workaround stripped by staging-next codegen (d4f824f)
  • zero_trust_access_application: skip MFA infrastructure test ([4dd2f87](https://redirect.github.com/cloudflare/terraform-provider-cloudflare/commit/4dd2f87449f259e9ca302dc7088c21721cab7b

❗ Important

✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 9am on tuesday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner July 21, 2026 08:59
@renovate
renovate Bot enabled auto-merge (squash) July 21, 2026 08:59
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Terraform Plan

Shared

✅ 1password/account — No changes
✅ 1password/futo-account — No changes
❌ bunny/futo-account — Error
│ Error: Error acquiring the state lock
│ 
│ Error message: Workspace is already locked: default
│ Lock Info:
│   ID:        d7c5c858-8a4c-586e-dc6a-05c9424f67a8
│   Path:      
❌ cloudflare/api-keys — Error
│ Error: Invalid data source
│ 
│   on api-keys.tf line 1, in data "cloudflare_api_token_permission_groups" "all":
│    1: data "cloudflare_api_token_permission_groups" "all" {}
│ 
│ The provider cloudflare/cloudflare does not support data source
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 3, in resource "cloudflare_api_token" "terraform_cloudflare_account":
│    3: resource "cloudflare_api_token" "terraform_cloudflare_account" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 5, in resource "cloudflare_api_token" "terraform_cloudflare_account":
│    5:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 40, in resource "cloudflare_api_token" "terraform_cloudflare_docs":
│   40: resource "cloudflare_api_token" "terraform_cloudflare_docs" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 42, in resource "cloudflare_api_token" "terraform_cloudflare_docs":
│   42:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 58, in resource "cloudflare_api_token" "terraform_cloudflare_pages_upload":
│   58: resource "cloudflare_api_token" "terraform_cloudflare_pages_upload" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 60, in resource "cloudflare_api_token" "terraform_cloudflare_pages_upload":
│   60:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 75, in resource "cloudflare_api_token" "mich_cloudflare_r2_token":
│   75: resource "cloudflare_api_token" "mich_cloudflare_r2_token" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 77, in resource "cloudflare_api_token" "mich_cloudflare_r2_token":
│   77:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 86, in resource "cloudflare_api_token" "mich_cloudflare_r2_token":
│   86:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 95, in resource "cloudflare_api_token" "mich_cloudflare_r2_token":
│   95:   condition {
│ 
│ Blocks of type "condition" are not expected here. Did you mean to define
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 112, in resource "cloudflare_api_token" "tiles_r2_kv_token":
│  112: resource "cloudflare_api_token" "tiles_r2_kv_token" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 114, in resource "cloudflare_api_token" "tiles_r2_kv_token":
│  114:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 125, in resource "cloudflare_api_token" "tiles_r2_kv_token":
│  125:   policy {
│ 
│ Blocks of type "policy" are not expected here.
--
│ Error: Missing required argument
│ 
│   on api-keys.tf line 146, in resource "cloudflare_api_token" "static_bucket_api_token":
│  146: resource "cloudflare_api_token" "static_bucket_api_token" {
│ 
│ The argument "policies" is required, but no definition was found.
--
│ Error: Unsupported block type
│ 
│   on api-keys.tf line 149, in resource "cloudflare_api_token" "static_bucket_api_token":
│  149:   policy {
│ 
│ Blocks of type "policy" are not expected here.
✅ cloudflare/futo-account — No changes
✅ cloudflare/futo-api-keys — No changes
⚠️ github/org — Plan: 1 to add, 0 to change, 0 to destroy.
OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  # github_repository_file.default_files["core-infra-tf/.github/workflows/org-pr-require-conventional-commit.yml"] will be created
  + resource "github_repository_file" "default_files" {
      + autocreate_branch_source_sha = (known after apply)
      + branch                       = (known after apply)
      + commit_message               = "chore: modify .github/workflows/org-pr-require-conventional-commit.yml"
      + commit_sha                   = (known after apply)
      + content                      = <<-EOT
            name: PR Conventional Commit
            on:
              pull_request:
                types: [opened, synchronize, reopened, edited]
            jobs:
              validate-pr-title:
                name: Validate PR Title (conventional commit)
                uses: <concealed by 1Password>/devtools/.github/workflows/shared-pr-require-conventional-commit.yml@main
                permissions:
                  pull-requests: write
        EOT
      + file                         = ".github/workflows/org-pr-require-conventional-commit.yml"
      + id                           = (known after apply)
      + overwrite_on_create          = true
      + ref                          = (known after apply)
      + repository                   = "core-infra-tf"
      + repository_id                = (known after apply)
      + sha                          = (known after apply)
    }
Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│ 
│   with github_repository.repositories["walkrs"],
│   on repositories.tf line 179, in resource "github_repository" "repositories":
│  179:   vulnerability_alerts      = !each.value.archived
│ 
│ Use the github_repository_vulnerability_alerts resource instead. This field
│ will be removed in a future version.
│ 
│ (and 25 more similar warnings elsewhere)
╵
─────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so OpenTofu can't
guarantee to take exactly these actions if you run "tofu apply" now.
✅ github/webhooks — No changes
✅ netbird/account — No changes

Scoped (dev)

⚠️ No modules detected in plan output — the output format may have changed.

Scoped (prod)

⚠️ No modules detected in plan output — the output format may have changed.

Scoped (staging — zitadel customer)

⚠️ No modules detected in plan output — the output format may have changed.

@renovate
renovate Bot force-pushed the renovate/cloudflare-5.x branch 21 times, most recently from 7f7005e to 1abcf15 Compare July 27, 2026 17:13
@renovate
renovate Bot force-pushed the renovate/cloudflare-5.x branch 11 times, most recently from 161fb6c to 73ef31c Compare August 5, 2026 10:20
@renovate renovate Bot changed the title chore(deps): update terraform cloudflare to v5.22.0 chore(deps): update terraform cloudflare to v5 Aug 5, 2026
@renovate
renovate Bot force-pushed the renovate/cloudflare-5.x branch 9 times, most recently from 9fbf119 to 9d2a0bb Compare August 12, 2026 03:01
@renovate
renovate Bot force-pushed the renovate/cloudflare-5.x branch 3 times, most recently from 7c882c3 to 2da5a7f Compare August 13, 2026 15:06
@renovate
renovate Bot force-pushed the renovate/cloudflare-5.x branch 3 times, most recently from eb0f305 to addbbe3 Compare August 27, 2026 16:24
@futo-kritika

futo-kritika Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Re-runKritika Review

Updates three Terraform modules to Cloudflare provider v5.

6 findings · 6 blocking

Confidence 1/5 · high risk: The diff only bumps the Cloudflare provider constraint to v5 in three shared modules, and the review reports six blocking v4-to-v5 breaks: the Pages build_config block, the zone lookups, the pages_domain argument, the cloudflare_record rename, the removed R2 permission-group lookup, and the token policy schema. Those are the same v5 changes the review checked against the v4.46 to v5.27 schema, so the modules will not plan, and the record rename without a state move could plan a destroy of existi …

Not approved: confidence 1/5 is below the threshold of 4

Findings

Summary

The change advances the provider constraints for Pages projects, custom domains, and R2 buckets. These modules still use v4 resource names, lookup inputs, and nested-block schemas that v5 does not accept. The provider update needs the corresponding configuration and DNS state migrations before these modules can plan successfully.

Sources consulted

Commands offered: curl, fd, gh, jq, rg, yq; run: rg.

Reviews (1) · Last reviewed commit: "chore(deps): update terraform cloudflare..." · openai/gpt-6.1-sol · $0.14

cloudflare = {
source = "cloudflare/cloudflare"
version = "~>4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Convert the Pages build configuration to a v5 object

The project still declares build_config { ... } in project.tf. Cloudflare v5 defines this as a single nested attribute, so selecting v5 makes Terraform reject the block and prevents planning this module.

Suggested fix

Convert project.tf's block to build_config = { ... }, retaining the analytics fields and existing build-caching lifecycle exclusion.

Prompt for a coding agent
In tf/shared/modules/cloudflare-pages-project/project.tf, convert lines 6-9 from a build_config block to the object attribute build_config = { ... }, retaining both analytics values and the build_caching ignore_changes entry, before enabling v5 in config.tf.

cloudflare = {
source = "cloudflare/cloudflare"
version = "~>4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Migrate both name-based zone lookups

Both Pages modules still configure data "cloudflare_zone" with top-level name = var.domain. In v5, name is computed-only; name-based lookup now belongs in filter.name. The domain module also reads .zone_id, which is now an optional input rather than the returned identifier, so it must read .id after switching to a filter.

Suggested fix

Change both zone lookups to filter = { name = var.domain } and change the DNS record's zone ID expression to data.cloudflare_zone.domain.id.

Prompt for a coding agent
Update the cloudflare_zone data sources in tf/shared/modules/cloudflare-pages-project/project.tf and tf/shared/modules/cloudflare-pages/domain.tf to use filter = { name = var.domain } instead of the top-level name input. In the Pages domain module, use data.cloudflare_zone.domain.id as the DNS record's zone_id.

cloudflare = {
source = "cloudflare/cloudflare"
version = "~>4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Rename the Pages custom-domain argument for v5

The existing cloudflare_pages_domain.pages_domain resource still sets domain = module.domain.fqdn. The v5 schema replaces domain with required name, so this provider bump leaves an unsupported argument and a missing required argument in the module.

Suggested fix

Rename the Pages domain resource's domain argument to name, preserving its value.

Prompt for a coding agent
In tf/shared/modules/cloudflare-pages/domain.tf, replace domain = module.domain.fqdn in cloudflare_pages_domain.pages_domain with name = module.domain.fqdn to match the v5 provider schema.

cloudflare = {
source = "cloudflare/cloudflare"
version = "~>4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Migrate the DNS record resource and its outputs

domain.tf still manages cloudflare_record.pages_subdomain, which v5 renames to cloudflare_dns_record. outputs.tf also references the old resource and its hostname attribute, absent from the v5 DNS schema. The module cannot plan under v5 without migrating the resource and its outputs; existing managed records also need a state migration rather than treating the rename as a new record.

Suggested fix

Rename the resource and its references, use .name for the hostname output, and include the supported state-migration procedure for existing DNS records.

Prompt for a coding agent
Migrate cloudflare_record.pages_subdomain in tf/shared/modules/cloudflare-pages/domain.tf to cloudflare_dns_record.pages_subdomain. Update both references in outputs.tf and replace the removed hostname output access with the v5 record's name attribute. Provide the provider-supported state migration for the resource-type rename and check that an existing record is not destroyed and recreated.

cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Migrate the R2 permission-group lookup

main.tf still uses cloudflare_api_token_permission_groups.all.r2[...]. The v5 provider removes this data source and exposes permission groups through cloudflare_api_token_permission_groups_list.result instead of scope-indexed maps. As written, the bucket-token permission lookup cannot be evaluated with the newly required provider.

Suggested fix

Use the v5 permission-groups list data source and resolve the read/write IDs from its result entries, preserving the R2 scope restriction and aliased provider.

Prompt for a coding agent
In tf/shared/modules/cloudflare-r2-bucket/main.tf, replace the removed cloudflare_api_token_permission_groups data source with cloudflare_api_token_permission_groups_list, retaining the cloudflare.api_keys provider. Resolve the two Workers R2 Storage Bucket Item permission IDs from result entries by name and R2 scope instead of indexing all.r2.

cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.46"
version = "~> 5.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking · correctness] Convert the bucket token policy and conditions to v5

The token resource in main.tf retains v4's policy block, string permission IDs, map-valued resources, and dynamic condition block. V5 requires a policies list with explicit effect, permission-group objects, JSON-string resources, and object-valued conditions. Consequently the module still fails planning even after migrating its permission lookup; the conversion must also preserve the configured CIDR restriction.

Suggested fix

Convert the token to the v5 policies/object schema, JSON-encode the bucket resource map, explicitly set effect = "allow", and express the optional IP condition as an object or null.

Prompt for a coding agent
In tf/shared/modules/cloudflare-r2-bucket/main.tf, migrate cloudflare_api_token.bucket_api_token to policies = [{ effect = "allow", permission_groups = [{ id = ... }, { id = ... }], resources = jsonencode({ ... }) }]. Replace the dynamic condition block with condition = length(var.allowed_cidrs) > 0 ? { request_ip = { in = var.allowed_cidrs } } : null, preserving the existing bucket-specific resource key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants