Skip to content

cloudflare_workers_kv - Provider produced inconsistent result after apply when key_value contains backslash #6542

@NozkaK

Description

@NozkaK

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

cloudflare/cloudflare v5.14.0

Affected resource(s)

cloudflare_workers_kv

Terraform configuration files

resource "cloudflare_workers_kv_namespace" "example_ns" {
  account_id = var.account_id
  title      = "test-namespace"
}

resource "cloudflare_workers_kv" "example" {
  account_id   = var.account_id
  namespace_id = cloudflare_workers_kv_namespace.example_ns.id
  key_name     = "key/value"
  value        = "value"
}

Link to debug output

.

Panic output

Error: Provider produced inconsistent result after apply

When applying changes to cloudflare_workers_kv.example, provider
"provider["registry.terraform.io/cloudflare/cloudflare"]" produced an
unexpected new value: .key_name: was cty.StringVal("key/value"), but now
cty.StringVal("key%2Fvalue").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Expected output

The KV value to be created without errors

Actual output

Following error occurs:

Error: Provider produced inconsistent result after apply

When applying changes to cloudflare_workers_kv.example, provider
"provider["registry.terraform.io/cloudflare/cloudflare"]" produced an
unexpected new value: .key_name: was cty.StringVal("key/value"), but now
cty.StringVal("key%2Fvalue").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Steps to reproduce

  1. Create a cloudflare_workers_kv_namespace
  2. Create a cloudflare_workers_kv with a key_name containing \
  3. Apply terraform changes

Additional factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.version/5Categorizes issue or PR as related to version 5 of the provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions