pulumi-cloudflare icon indicating copy to clipboard operation
pulumi-cloudflare copied to clipboard

Cloudflare KV binary value

Open KaziSadmanAhmed opened this issue 2 years ago • 2 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Cloudflare Workers KV supports uploading binary assets such as images but this plugin only supports string as the value of a KV entry. Please check the value property from the official documentation.

Proposed solutions:

  • Support both binary data or file path and string as a value (https://api.cloudflare.com/#workers-kv-namespace-write-key-value-pair)
  • Use the bulk update endpoint and add the base64 field (https://api.cloudflare.com/#workers-kv-namespace-write-multiple-key-value-pairs)

Additional references: https://developers.cloudflare.com/workers/runtime-apis/kv/#parameters https://blog.cloudflare.com/whats-new-with-workers-kv/

Affected area/feature

Upload binary assets in Cloudflare KV

KaziSadmanAhmed avatar Mar 10 '22 19:03 KaziSadmanAhmed

Created an issue in the cloudflare terraform provider repo as well.

https://github.com/cloudflare/terraform-provider-cloudflare/issues/1505

KaziSadmanAhmed avatar Mar 11 '22 09:03 KaziSadmanAhmed

@sadmanbd Thanks so much for submitting this issue and the one upstream! We'll incorporate into the Pulumi provider soon after the upstream is ready. If you sense our release for this provider lagging behind, please ping us here or in the Pulumi Community Slack.

jkodroff avatar Mar 15 '22 18:03 jkodroff