Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy a Wasm worker #2039

Closed
omarabid opened this issue Nov 19, 2022 · 4 comments
Closed

How to deploy a Wasm worker #2039

omarabid opened this issue Nov 19, 2022 · 4 comments
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. service/workers Categorizes issue or PR as related to the Workers service. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.

Comments

@omarabid
Copy link

omarabid commented Nov 19, 2022

Current Terraform and Cloudflare provider version

Terraform: 1.3.5
Cloudflare: 3.28

Description

I'm currently deploying rust-wasm workers. The workers are built with worker-build and published with wrangler publish. It seems these are multi-file workers.

I'm a bit at loss of how I can configure the Terraform resource for such a worker since I can only include one file (the entry file); whereas I have two files (the JS entry file and a WASM file)

Use cases

rust-wasm workers

Potential Terraform configuration

resource "cloudflare_worker_script" "my_script" {
  name    = "script_1"
  content = file("../path/build/worker/shim.mjs")
}

References

Upload worker module

@omarabid omarabid added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 19, 2022
@jacobbednarz
Copy link
Member

this isn't supported by the Terraform provider atm. see cloudflare/cloudflare-go#1128 where we are discussing the interface and usage.

@jacobbednarz jacobbednarz added workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. service/workers Categorizes issue or PR as related to the Workers service. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 20, 2022
@starptr
Copy link

starptr commented Mar 29, 2023

Does the webassembly_binding property not work for this case?

Edit: It doesn't; I tried using it. I'm not sure what the use case for the webassembly_binding property is.

@omarabid
Copy link
Author

Does the webassembly_binding property not work for this case?

Edit: It doesn't; I tried using it. I'm not sure what the use case for the webassembly_binding property is.

It is not clear what it does, since you should be using the service_binding to bind other services (whether wasm or javascript)

@jacobbednarz
Copy link
Member

This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. service/workers Categorizes issue or PR as related to the Workers service. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.
Projects
None yet
Development

No branches or pull requests

3 participants