You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This basically says "run the script to build app.wasm, then deploy the worker script with it as a binding". There's some quirks I still need to work out with TF lifecycle to ensure it builds before trying to take the filebase64, but that's not the bug I'm currently hitting.
The bug I'm hitting is that, whether or not I use the local-exec trick, deploying the script fails with:
╷
│ Error: error creating worker script: Uncaught SyntaxError: Cannot use import statement outside a module
│ at worker.js:1
│ (10021)
│
│ with cloudflare_worker_script.script,
│ on main.tf line 18, in resource "cloudflare_worker_script" "script":
│ 18: resource "cloudflare_worker_script" "script" {
│
I guess I'm opening this in case anybody's gotten this to work with this package, or understands the error message well enough to give any hints about what might be happening.
The text was updated successfully, but these errors were encountered:
I'm trying to get this (Very helpful! Thank you!) package to integrate with a Terraform workflow, instead of deploying using
wrangler publish
.Here's what I've managed to get so far:
Refs:
This basically says "run the script to build
app.wasm
, then deploy the worker script with it as a binding". There's some quirks I still need to work out with TF lifecycle to ensure it builds before trying to take thefilebase64
, but that's not the bug I'm currently hitting.The bug I'm hitting is that, whether or not I use the
local-exec
trick, deploying the script fails with:Digging around, it might be the case that the TF provider just doesn't support WASM workers, even though it claims to: cloudflare/terraform-provider-cloudflare#2039
I guess I'm opening this in case anybody's gotten this to work with this package, or understands the error message well enough to give any hints about what might be happening.
The text was updated successfully, but these errors were encountered: