-
Notifications
You must be signed in to change notification settings - Fork 760
Description
Confirmation
- This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
- I have searched the issue tracker and my issue isn't already found.
- I have replicated my issue using the latest version of the provider and it is still present.
Terraform and Cloudflare provider version
- provider registry.terraform.io/cloudflare/cloudflare v5.11.0
Affected resource(s)
cloudflare_worker_version.sites_estaticos
Terraform configuration files
resource "cloudflare_worker" "sites_estaticos" {
account_id = var.cloudflare_account_id
name = "sites-estaticos-test"
observability = {
enabled = false
}
}
resource "cloudflare_worker_version" "sites_estaticos" {
account_id = var.cloudflare_account_id
worker_id = cloudflare_worker.sites_estaticos.id
compatibility_date = "2025-10-03"
main_module = "sites-estaticos"
lifecycle {
create_before_destroy = true
}
modules = [
{
name = "sites-estaticos"
content_type = "application/javascript+module"
content_file = abspath("${path.module}/workers/sites-tests.js")
}
]
}
resource "cloudflare_workers_deployment" "sites_estaticos" {
account_id = var.cloudflare_account_id
script_name = cloudflare_worker.sites_estaticos.name
strategy = "percentage"
versions = [{
percentage = 100
version_id = cloudflare_worker_version.sites_estaticos.id
}]
}
Link to debug output
--
Panic output
Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudflare_worker_version.sites_estaticos, provider "provider["registry.terraform.io/cloudflare/cloudflare"]" produced an unexpected new value: .modules: planned set element
│ cty.ObjectVal(map[string]cty.Value{"content_file":cty.StringVal("./workers/sites-tests.js"),
│ "content_sha256":cty.StringVal("15dedebb46f3083dc40006a2184ba36fb01a16da32fbdebdd534242b36c30d6f"), "content_type":cty.StringVal("application/javascript+module"), "name":cty.StringVal("sites-estaticos")})
│ does not correlate with any element in actual.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
2025-10-03T11:22:28.456-0300 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-10-03T11:22:28.457-0300 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/cloudflare/cloudflare/5.11.0/linux_amd64/terraform-provider-cloudflare_v5.11.0 id=68739
2025-10-03T11:22:28.457-0300 [DEBUG] provider: plugin exited
Expected output
The js script to be updated
Actual output
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudflare_worker_version.sites_estaticos, provider "provider["registry.terraform.io/cloudflare/cloudflare"]" produced an unexpected new value: .modules: planned set element
│ cty.ObjectVal(map[string]cty.Value{"content_file":cty.StringVal("./workers/sites-tests.js"),
│ "content_sha256":cty.StringVal("15dedebb46f3083dc40006a2184ba36fb01a16da32fbdebdd534242b36c30d6f"), "content_type":cty.StringVal("application/javascript+module"), "name":cty.StringVal("sites-estaticos")})
│ does not correlate with any element in actual.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
Steps to reproduce
- Create a cloudflare_worker
- Create cloudflare_worker_version
- Create cloudflare_workers_deployment
- Apply the resources
- Try to update the js script
- Apply the changes
Additional factoids
No response
References
No response