Cloudflare · tool · fg-0594

terraform import and data sources for cloudflare_ai_search_instance fail after upgrading to provider v5.29.0

If you see terraform import cloudflare_ai_search_instance.docs /docs fails with an invalid import ID, the cause and the fix for Cloudflare are below, last verified 2026-11-13.

Verified Nov 2026trust 50/100
Symptom
terraform import cloudflare_ai_search_instance.docs /docs fails with an invalid import IDdata "cloudflare_ai_search_instance" or data "cloudflare_ai_search_instances" fails validation because namespace is missingfilter.namespace on the cloudflare_ai_search_instance data source is rejected as an unsupported argumentplan shows an instance being replaced after namespace is changed
Cause
Provider v5.29.0 added a namespace argument to cloudflare_ai_search_instance. The import ID now has three parts, the two data sources require namespace, and the old filter.namespace argument was removed. Changing namespace on an existing instance forces replacement.
Fix
Use the three-part import ID with default as the namespace for existing instances. Add namespace = "default" to every instance data source block, remove filter.namespace, and do not change namespace on a live instance unless you accept a replace.
Apply
terraform import cloudflare_ai_search_instance.docs <account_id>/default/docs # data source data "cloudflare_ai_search_instance" "docs" { account_id = var.account_id namespace = "default" id = "docs" }
Affected
Cloudflare Terraform provider v5.29.0 and later, announced 2026-11-13
Sources

Last verified 2026-11-13 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun