Errors Deploying Worker Module in Terraform

I’m trying to deploy a worker using modules and terraform. I get the following error. If I try and use the exact same code using quick edit in the console, it works as expected. Is this a limitation of the terraform provider? Plans on getting this resolved? This is actually preventing me from using this new feature. I’ve also created a support ticket, but sometimes things happen faster here… :slight_smile:
{
“result”: null,
“success”: false,
“errors”: [
{
“code”: 10021,
“message”: “Uncaught SyntaxError: Unexpected token ‘export’\n at line 49\n”
}
],
“messages”:
}

May I just ask was this error related to the below incident, or rather it’s related to the Terraform iteself?:

https://community.cloudflare.com/t/cloudflare-workers-updating-delays/338826?u=fritex

I believe this is a terraform specific issue. Error responses are 400 bad requests. I can also make the same changes just fine through the console. So… I think it is a TF issue.

Terraform does not work because the API to upload a worker is broken when trying to upload module based workers. I’ve run into the same issue just using the script upload API without Terraform.

https://api.cloudflare.com/#worker-script-upload-worker

Terraform sources showing it uses the same upload endpoint: