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

Support for ES module worker scripts #969

Open
bozyk-m opened this issue Nov 15, 2024 · 1 comment
Open

Support for ES module worker scripts #969

bozyk-m opened this issue Nov 15, 2024 · 1 comment
Labels
kind/enhancement Improvements or new features

Comments

@bozyk-m
Copy link

bozyk-m commented Nov 15, 2024

According to this: https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ ES module syntax is a preferred way of developing workers.
Yet, with Pulumi, it's not supported to have a multi-file worker script.
Exemplary script from Cloudflare Dashboard, named "To-do List App" consists of multiple files Image

when imported the copy-paste fragment does not reflect that:

accountId:  "omitted"
content: (json) {
  license: "ISC"
  name: "calm-dawn-d154"
  version: "1.0.0"
}

kvNamespaceBindings: [
  [0]: {
    name: "EXAMPLE_TODOS"
    namespaceId: "omitted"
  }
]
name : "calm-dawn-d154"

This seems to be supported in the Terraform provider - https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/workers_script#any_part_name-1

Is there any chance to add support for this in the Pulumi provider?

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Nov 15, 2024
@iwahbe iwahbe added kind/enhancement Improvements or new features and removed needs-triage Needs attention from the triage team labels Nov 18, 2024
@iwahbe
Copy link
Member

iwahbe commented Nov 18, 2024

Hi @bozyk-m, thanks for opening an issue.
It is supported on the Terraform provider in 5.0.0-alpha1. pulumi-cloudflare tracks cloudflare/terraform-provider-cloudflare's stable, so we don't have the alpha release. As soon as terraform-provider-cloudflare releases 5.0.0, we will add support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants