1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. WorkerScript
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

cloudflare.WorkerScript

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Provides a Cloudflare worker script resource. In order for a script to be active, you’ll also need to setup a cloudflare.WorkerRoute.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    import * as std from "@pulumi/std";
    
    const myNamespace = new cloudflare.WorkersKvNamespace("my_namespace", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        title: "example",
    });
    // Sets the script with the name "script_1"
    const myScript = new cloudflare.WorkerScript("my_script", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "script_1",
        content: std.file({
            input: "script.js",
        }).then(invoke => invoke.result),
        kvNamespaceBindings: [{
            name: "MY_EXAMPLE_KV_NAMESPACE",
            namespaceId: myNamespace.id,
        }],
        plainTextBindings: [{
            name: "MY_EXAMPLE_PLAIN_TEXT",
            text: "foobar",
        }],
        secretTextBindings: [{
            name: "MY_EXAMPLE_SECRET_TEXT",
            text: secretFooValue,
        }],
        webassemblyBindings: [{
            name: "MY_EXAMPLE_WASM",
            module: std.filebase64({
                input: "example.wasm",
            }).then(invoke => invoke.result),
        }],
        serviceBindings: [{
            name: "MY_SERVICE_BINDING",
            service: "MY_SERVICE",
            environment: "production",
        }],
        r2BucketBindings: [{
            name: "MY_BUCKET",
            bucketName: "MY_BUCKET_NAME",
        }],
        analyticsEngineBindings: [{
            name: "MY_DATASET",
            dataset: "dataset1",
        }],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    import pulumi_std as std
    
    my_namespace = cloudflare.WorkersKvNamespace("my_namespace",
        account_id="f037e56e89293a057740de681ac9abbe",
        title="example")
    # Sets the script with the name "script_1"
    my_script = cloudflare.WorkerScript("my_script",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="script_1",
        content=std.file(input="script.js").result,
        kv_namespace_bindings=[{
            "name": "MY_EXAMPLE_KV_NAMESPACE",
            "namespace_id": my_namespace.id,
        }],
        plain_text_bindings=[{
            "name": "MY_EXAMPLE_PLAIN_TEXT",
            "text": "foobar",
        }],
        secret_text_bindings=[{
            "name": "MY_EXAMPLE_SECRET_TEXT",
            "text": secret_foo_value,
        }],
        webassembly_bindings=[{
            "name": "MY_EXAMPLE_WASM",
            "module": std.filebase64(input="example.wasm").result,
        }],
        service_bindings=[{
            "name": "MY_SERVICE_BINDING",
            "service": "MY_SERVICE",
            "environment": "production",
        }],
        r2_bucket_bindings=[{
            "name": "MY_BUCKET",
            "bucket_name": "MY_BUCKET_NAME",
        }],
        analytics_engine_bindings=[{
            "name": "MY_DATASET",
            "dataset": "dataset1",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myNamespace, err := cloudflare.NewWorkersKvNamespace(ctx, "my_namespace", &cloudflare.WorkersKvNamespaceArgs{
    			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Title:     pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "script.js",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeFilebase641, err := std.Filebase64(ctx, &std.Filebase64Args{
    			Input: "example.wasm",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Sets the script with the name "script_1"
    		_, err = cloudflare.NewWorkerScript(ctx, "my_script", &cloudflare.WorkerScriptArgs{
    			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:      pulumi.String("script_1"),
    			Content:   pulumi.String(invokeFile.Result),
    			KvNamespaceBindings: cloudflare.WorkerScriptKvNamespaceBindingArray{
    				&cloudflare.WorkerScriptKvNamespaceBindingArgs{
    					Name:        pulumi.String("MY_EXAMPLE_KV_NAMESPACE"),
    					NamespaceId: myNamespace.ID(),
    				},
    			},
    			PlainTextBindings: cloudflare.WorkerScriptPlainTextBindingArray{
    				&cloudflare.WorkerScriptPlainTextBindingArgs{
    					Name: pulumi.String("MY_EXAMPLE_PLAIN_TEXT"),
    					Text: pulumi.String("foobar"),
    				},
    			},
    			SecretTextBindings: cloudflare.WorkerScriptSecretTextBindingArray{
    				&cloudflare.WorkerScriptSecretTextBindingArgs{
    					Name: pulumi.String("MY_EXAMPLE_SECRET_TEXT"),
    					Text: pulumi.Any(secretFooValue),
    				},
    			},
    			WebassemblyBindings: cloudflare.WorkerScriptWebassemblyBindingArray{
    				&cloudflare.WorkerScriptWebassemblyBindingArgs{
    					Name:   pulumi.String("MY_EXAMPLE_WASM"),
    					Module: pulumi.String(invokeFilebase641.Result),
    				},
    			},
    			ServiceBindings: cloudflare.WorkerScriptServiceBindingArray{
    				&cloudflare.WorkerScriptServiceBindingArgs{
    					Name:        pulumi.String("MY_SERVICE_BINDING"),
    					Service:     pulumi.String("MY_SERVICE"),
    					Environment: pulumi.String("production"),
    				},
    			},
    			R2BucketBindings: cloudflare.WorkerScriptR2BucketBindingArray{
    				&cloudflare.WorkerScriptR2BucketBindingArgs{
    					Name:       pulumi.String("MY_BUCKET"),
    					BucketName: pulumi.String("MY_BUCKET_NAME"),
    				},
    			},
    			AnalyticsEngineBindings: cloudflare.WorkerScriptAnalyticsEngineBindingArray{
    				&cloudflare.WorkerScriptAnalyticsEngineBindingArgs{
    					Name:    pulumi.String("MY_DATASET"),
    					Dataset: pulumi.String("dataset1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myNamespace = new Cloudflare.WorkersKvNamespace("my_namespace", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Title = "example",
        });
    
        // Sets the script with the name "script_1"
        var myScript = new Cloudflare.WorkerScript("my_script", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "script_1",
            Content = Std.File.Invoke(new()
            {
                Input = "script.js",
            }).Apply(invoke => invoke.Result),
            KvNamespaceBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptKvNamespaceBindingArgs
                {
                    Name = "MY_EXAMPLE_KV_NAMESPACE",
                    NamespaceId = myNamespace.Id,
                },
            },
            PlainTextBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptPlainTextBindingArgs
                {
                    Name = "MY_EXAMPLE_PLAIN_TEXT",
                    Text = "foobar",
                },
            },
            SecretTextBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptSecretTextBindingArgs
                {
                    Name = "MY_EXAMPLE_SECRET_TEXT",
                    Text = secretFooValue,
                },
            },
            WebassemblyBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptWebassemblyBindingArgs
                {
                    Name = "MY_EXAMPLE_WASM",
                    Module = Std.Filebase64.Invoke(new()
                    {
                        Input = "example.wasm",
                    }).Apply(invoke => invoke.Result),
                },
            },
            ServiceBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptServiceBindingArgs
                {
                    Name = "MY_SERVICE_BINDING",
                    Service = "MY_SERVICE",
                    Environment = "production",
                },
            },
            R2BucketBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptR2BucketBindingArgs
                {
                    Name = "MY_BUCKET",
                    BucketName = "MY_BUCKET_NAME",
                },
            },
            AnalyticsEngineBindings = new[]
            {
                new Cloudflare.Inputs.WorkerScriptAnalyticsEngineBindingArgs
                {
                    Name = "MY_DATASET",
                    Dataset = "dataset1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.WorkersKvNamespace;
    import com.pulumi.cloudflare.WorkersKvNamespaceArgs;
    import com.pulumi.cloudflare.WorkerScript;
    import com.pulumi.cloudflare.WorkerScriptArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptKvNamespaceBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptPlainTextBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptSecretTextBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptWebassemblyBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptServiceBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptR2BucketBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkerScriptAnalyticsEngineBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myNamespace = new WorkersKvNamespace("myNamespace", WorkersKvNamespaceArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .title("example")
                .build());
    
            // Sets the script with the name "script_1"
            var myScript = new WorkerScript("myScript", WorkerScriptArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("script_1")
                .content(StdFunctions.file(FileArgs.builder()
                    .input("script.js")
                    .build()).result())
                .kvNamespaceBindings(WorkerScriptKvNamespaceBindingArgs.builder()
                    .name("MY_EXAMPLE_KV_NAMESPACE")
                    .namespaceId(myNamespace.id())
                    .build())
                .plainTextBindings(WorkerScriptPlainTextBindingArgs.builder()
                    .name("MY_EXAMPLE_PLAIN_TEXT")
                    .text("foobar")
                    .build())
                .secretTextBindings(WorkerScriptSecretTextBindingArgs.builder()
                    .name("MY_EXAMPLE_SECRET_TEXT")
                    .text(secretFooValue)
                    .build())
                .webassemblyBindings(WorkerScriptWebassemblyBindingArgs.builder()
                    .name("MY_EXAMPLE_WASM")
                    .module(StdFunctions.filebase64(Filebase64Args.builder()
                        .input("example.wasm")
                        .build()).result())
                    .build())
                .serviceBindings(WorkerScriptServiceBindingArgs.builder()
                    .name("MY_SERVICE_BINDING")
                    .service("MY_SERVICE")
                    .environment("production")
                    .build())
                .r2BucketBindings(WorkerScriptR2BucketBindingArgs.builder()
                    .name("MY_BUCKET")
                    .bucketName("MY_BUCKET_NAME")
                    .build())
                .analyticsEngineBindings(WorkerScriptAnalyticsEngineBindingArgs.builder()
                    .name("MY_DATASET")
                    .dataset("dataset1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myNamespace:
        type: cloudflare:WorkersKvNamespace
        name: my_namespace
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          title: example
      # Sets the script with the name "script_1"
      myScript:
        type: cloudflare:WorkerScript
        name: my_script
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: script_1
          content:
            fn::invoke:
              Function: std:file
              Arguments:
                input: script.js
              Return: result
          kvNamespaceBindings:
            - name: MY_EXAMPLE_KV_NAMESPACE
              namespaceId: ${myNamespace.id}
          plainTextBindings:
            - name: MY_EXAMPLE_PLAIN_TEXT
              text: foobar
          secretTextBindings:
            - name: MY_EXAMPLE_SECRET_TEXT
              text: ${secretFooValue}
          webassemblyBindings:
            - name: MY_EXAMPLE_WASM
              module:
                fn::invoke:
                  Function: std:filebase64
                  Arguments:
                    input: example.wasm
                  Return: result
          serviceBindings:
            - name: MY_SERVICE_BINDING
              service: MY_SERVICE
              environment: production
          r2BucketBindings:
            - name: MY_BUCKET
              bucketName: MY_BUCKET_NAME
          analyticsEngineBindings:
            - name: MY_DATASET
              dataset: dataset1
    

    Create WorkerScript Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WorkerScript(name: string, args: WorkerScriptArgs, opts?: CustomResourceOptions);
    @overload
    def WorkerScript(resource_name: str,
                     args: WorkerScriptArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkerScript(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     content: Optional[str] = None,
                     name: Optional[str] = None,
                     account_id: Optional[str] = None,
                     module: Optional[bool] = None,
                     placements: Optional[Sequence[WorkerScriptPlacementArgs]] = None,
                     d1_database_bindings: Optional[Sequence[WorkerScriptD1DatabaseBindingArgs]] = None,
                     dispatch_namespace: Optional[str] = None,
                     hyperdrive_config_bindings: Optional[Sequence[WorkerScriptHyperdriveConfigBindingArgs]] = None,
                     kv_namespace_bindings: Optional[Sequence[WorkerScriptKvNamespaceBindingArgs]] = None,
                     logpush: Optional[bool] = None,
                     compatibility_date: Optional[str] = None,
                     analytics_engine_bindings: Optional[Sequence[WorkerScriptAnalyticsEngineBindingArgs]] = None,
                     compatibility_flags: Optional[Sequence[str]] = None,
                     plain_text_bindings: Optional[Sequence[WorkerScriptPlainTextBindingArgs]] = None,
                     queue_bindings: Optional[Sequence[WorkerScriptQueueBindingArgs]] = None,
                     r2_bucket_bindings: Optional[Sequence[WorkerScriptR2BucketBindingArgs]] = None,
                     secret_text_bindings: Optional[Sequence[WorkerScriptSecretTextBindingArgs]] = None,
                     service_bindings: Optional[Sequence[WorkerScriptServiceBindingArgs]] = None,
                     tags: Optional[Sequence[str]] = None,
                     webassembly_bindings: Optional[Sequence[WorkerScriptWebassemblyBindingArgs]] = None)
    func NewWorkerScript(ctx *Context, name string, args WorkerScriptArgs, opts ...ResourceOption) (*WorkerScript, error)
    public WorkerScript(string name, WorkerScriptArgs args, CustomResourceOptions? opts = null)
    public WorkerScript(String name, WorkerScriptArgs args)
    public WorkerScript(String name, WorkerScriptArgs args, CustomResourceOptions options)
    
    type: cloudflare:WorkerScript
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkerScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkerScriptArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkerScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkerScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkerScriptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var workerScriptResource = new Cloudflare.WorkerScript("workerScriptResource", new()
    {
        Content = "string",
        Name = "string",
        AccountId = "string",
        Module = false,
        Placements = new[]
        {
            new Cloudflare.Inputs.WorkerScriptPlacementArgs
            {
                Mode = "string",
            },
        },
        D1DatabaseBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptD1DatabaseBindingArgs
            {
                DatabaseId = "string",
                Name = "string",
            },
        },
        DispatchNamespace = "string",
        HyperdriveConfigBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptHyperdriveConfigBindingArgs
            {
                Binding = "string",
                Id = "string",
            },
        },
        KvNamespaceBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptKvNamespaceBindingArgs
            {
                Name = "string",
                NamespaceId = "string",
            },
        },
        Logpush = false,
        CompatibilityDate = "string",
        AnalyticsEngineBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptAnalyticsEngineBindingArgs
            {
                Dataset = "string",
                Name = "string",
            },
        },
        CompatibilityFlags = new[]
        {
            "string",
        },
        PlainTextBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptPlainTextBindingArgs
            {
                Name = "string",
                Text = "string",
            },
        },
        QueueBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptQueueBindingArgs
            {
                Binding = "string",
                Queue = "string",
            },
        },
        R2BucketBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptR2BucketBindingArgs
            {
                BucketName = "string",
                Name = "string",
            },
        },
        SecretTextBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptSecretTextBindingArgs
            {
                Name = "string",
                Text = "string",
            },
        },
        ServiceBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptServiceBindingArgs
            {
                Name = "string",
                Service = "string",
                Environment = "string",
            },
        },
        Tags = new[]
        {
            "string",
        },
        WebassemblyBindings = new[]
        {
            new Cloudflare.Inputs.WorkerScriptWebassemblyBindingArgs
            {
                Module = "string",
                Name = "string",
            },
        },
    });
    
    example, err := cloudflare.NewWorkerScript(ctx, "workerScriptResource", &cloudflare.WorkerScriptArgs{
    	Content:   pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	AccountId: pulumi.String("string"),
    	Module:    pulumi.Bool(false),
    	Placements: cloudflare.WorkerScriptPlacementArray{
    		&cloudflare.WorkerScriptPlacementArgs{
    			Mode: pulumi.String("string"),
    		},
    	},
    	D1DatabaseBindings: cloudflare.WorkerScriptD1DatabaseBindingArray{
    		&cloudflare.WorkerScriptD1DatabaseBindingArgs{
    			DatabaseId: pulumi.String("string"),
    			Name:       pulumi.String("string"),
    		},
    	},
    	DispatchNamespace: pulumi.String("string"),
    	HyperdriveConfigBindings: cloudflare.WorkerScriptHyperdriveConfigBindingArray{
    		&cloudflare.WorkerScriptHyperdriveConfigBindingArgs{
    			Binding: pulumi.String("string"),
    			Id:      pulumi.String("string"),
    		},
    	},
    	KvNamespaceBindings: cloudflare.WorkerScriptKvNamespaceBindingArray{
    		&cloudflare.WorkerScriptKvNamespaceBindingArgs{
    			Name:        pulumi.String("string"),
    			NamespaceId: pulumi.String("string"),
    		},
    	},
    	Logpush:           pulumi.Bool(false),
    	CompatibilityDate: pulumi.String("string"),
    	AnalyticsEngineBindings: cloudflare.WorkerScriptAnalyticsEngineBindingArray{
    		&cloudflare.WorkerScriptAnalyticsEngineBindingArgs{
    			Dataset: pulumi.String("string"),
    			Name:    pulumi.String("string"),
    		},
    	},
    	CompatibilityFlags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PlainTextBindings: cloudflare.WorkerScriptPlainTextBindingArray{
    		&cloudflare.WorkerScriptPlainTextBindingArgs{
    			Name: pulumi.String("string"),
    			Text: pulumi.String("string"),
    		},
    	},
    	QueueBindings: cloudflare.WorkerScriptQueueBindingArray{
    		&cloudflare.WorkerScriptQueueBindingArgs{
    			Binding: pulumi.String("string"),
    			Queue:   pulumi.String("string"),
    		},
    	},
    	R2BucketBindings: cloudflare.WorkerScriptR2BucketBindingArray{
    		&cloudflare.WorkerScriptR2BucketBindingArgs{
    			BucketName: pulumi.String("string"),
    			Name:       pulumi.String("string"),
    		},
    	},
    	SecretTextBindings: cloudflare.WorkerScriptSecretTextBindingArray{
    		&cloudflare.WorkerScriptSecretTextBindingArgs{
    			Name: pulumi.String("string"),
    			Text: pulumi.String("string"),
    		},
    	},
    	ServiceBindings: cloudflare.WorkerScriptServiceBindingArray{
    		&cloudflare.WorkerScriptServiceBindingArgs{
    			Name:        pulumi.String("string"),
    			Service:     pulumi.String("string"),
    			Environment: pulumi.String("string"),
    		},
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	WebassemblyBindings: cloudflare.WorkerScriptWebassemblyBindingArray{
    		&cloudflare.WorkerScriptWebassemblyBindingArgs{
    			Module: pulumi.String("string"),
    			Name:   pulumi.String("string"),
    		},
    	},
    })
    
    var workerScriptResource = new WorkerScript("workerScriptResource", WorkerScriptArgs.builder()
        .content("string")
        .name("string")
        .accountId("string")
        .module(false)
        .placements(WorkerScriptPlacementArgs.builder()
            .mode("string")
            .build())
        .d1DatabaseBindings(WorkerScriptD1DatabaseBindingArgs.builder()
            .databaseId("string")
            .name("string")
            .build())
        .dispatchNamespace("string")
        .hyperdriveConfigBindings(WorkerScriptHyperdriveConfigBindingArgs.builder()
            .binding("string")
            .id("string")
            .build())
        .kvNamespaceBindings(WorkerScriptKvNamespaceBindingArgs.builder()
            .name("string")
            .namespaceId("string")
            .build())
        .logpush(false)
        .compatibilityDate("string")
        .analyticsEngineBindings(WorkerScriptAnalyticsEngineBindingArgs.builder()
            .dataset("string")
            .name("string")
            .build())
        .compatibilityFlags("string")
        .plainTextBindings(WorkerScriptPlainTextBindingArgs.builder()
            .name("string")
            .text("string")
            .build())
        .queueBindings(WorkerScriptQueueBindingArgs.builder()
            .binding("string")
            .queue("string")
            .build())
        .r2BucketBindings(WorkerScriptR2BucketBindingArgs.builder()
            .bucketName("string")
            .name("string")
            .build())
        .secretTextBindings(WorkerScriptSecretTextBindingArgs.builder()
            .name("string")
            .text("string")
            .build())
        .serviceBindings(WorkerScriptServiceBindingArgs.builder()
            .name("string")
            .service("string")
            .environment("string")
            .build())
        .tags("string")
        .webassemblyBindings(WorkerScriptWebassemblyBindingArgs.builder()
            .module("string")
            .name("string")
            .build())
        .build());
    
    worker_script_resource = cloudflare.WorkerScript("workerScriptResource",
        content="string",
        name="string",
        account_id="string",
        module=False,
        placements=[{
            "mode": "string",
        }],
        d1_database_bindings=[{
            "database_id": "string",
            "name": "string",
        }],
        dispatch_namespace="string",
        hyperdrive_config_bindings=[{
            "binding": "string",
            "id": "string",
        }],
        kv_namespace_bindings=[{
            "name": "string",
            "namespace_id": "string",
        }],
        logpush=False,
        compatibility_date="string",
        analytics_engine_bindings=[{
            "dataset": "string",
            "name": "string",
        }],
        compatibility_flags=["string"],
        plain_text_bindings=[{
            "name": "string",
            "text": "string",
        }],
        queue_bindings=[{
            "binding": "string",
            "queue": "string",
        }],
        r2_bucket_bindings=[{
            "bucket_name": "string",
            "name": "string",
        }],
        secret_text_bindings=[{
            "name": "string",
            "text": "string",
        }],
        service_bindings=[{
            "name": "string",
            "service": "string",
            "environment": "string",
        }],
        tags=["string"],
        webassembly_bindings=[{
            "module": "string",
            "name": "string",
        }])
    
    const workerScriptResource = new cloudflare.WorkerScript("workerScriptResource", {
        content: "string",
        name: "string",
        accountId: "string",
        module: false,
        placements: [{
            mode: "string",
        }],
        d1DatabaseBindings: [{
            databaseId: "string",
            name: "string",
        }],
        dispatchNamespace: "string",
        hyperdriveConfigBindings: [{
            binding: "string",
            id: "string",
        }],
        kvNamespaceBindings: [{
            name: "string",
            namespaceId: "string",
        }],
        logpush: false,
        compatibilityDate: "string",
        analyticsEngineBindings: [{
            dataset: "string",
            name: "string",
        }],
        compatibilityFlags: ["string"],
        plainTextBindings: [{
            name: "string",
            text: "string",
        }],
        queueBindings: [{
            binding: "string",
            queue: "string",
        }],
        r2BucketBindings: [{
            bucketName: "string",
            name: "string",
        }],
        secretTextBindings: [{
            name: "string",
            text: "string",
        }],
        serviceBindings: [{
            name: "string",
            service: "string",
            environment: "string",
        }],
        tags: ["string"],
        webassemblyBindings: [{
            module: "string",
            name: "string",
        }],
    });
    
    type: cloudflare:WorkerScript
    properties:
        accountId: string
        analyticsEngineBindings:
            - dataset: string
              name: string
        compatibilityDate: string
        compatibilityFlags:
            - string
        content: string
        d1DatabaseBindings:
            - databaseId: string
              name: string
        dispatchNamespace: string
        hyperdriveConfigBindings:
            - binding: string
              id: string
        kvNamespaceBindings:
            - name: string
              namespaceId: string
        logpush: false
        module: false
        name: string
        placements:
            - mode: string
        plainTextBindings:
            - name: string
              text: string
        queueBindings:
            - binding: string
              queue: string
        r2BucketBindings:
            - bucketName: string
              name: string
        secretTextBindings:
            - name: string
              text: string
        serviceBindings:
            - environment: string
              name: string
              service: string
        tags:
            - string
        webassemblyBindings:
            - module: string
              name: string
    

    WorkerScript Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The WorkerScript resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource.
    Content string
    The script content.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    AnalyticsEngineBindings List<WorkerScriptAnalyticsEngineBinding>
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags List<string>
    Compatibility flags used for Worker Scripts.
    D1DatabaseBindings List<WorkerScriptD1DatabaseBinding>
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings List<WorkerScriptHyperdriveConfigBinding>
    KvNamespaceBindings List<WorkerScriptKvNamespaceBinding>
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Placements List<WorkerScriptPlacement>
    PlainTextBindings List<WorkerScriptPlainTextBinding>
    QueueBindings List<WorkerScriptQueueBinding>
    R2BucketBindings List<WorkerScriptR2BucketBinding>
    SecretTextBindings List<WorkerScriptSecretTextBinding>
    ServiceBindings List<WorkerScriptServiceBinding>
    Tags List<string>
    WebassemblyBindings List<WorkerScriptWebassemblyBinding>
    AccountId string
    The account identifier to target for the resource.
    Content string
    The script content.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    AnalyticsEngineBindings []WorkerScriptAnalyticsEngineBindingArgs
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags []string
    Compatibility flags used for Worker Scripts.
    D1DatabaseBindings []WorkerScriptD1DatabaseBindingArgs
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings []WorkerScriptHyperdriveConfigBindingArgs
    KvNamespaceBindings []WorkerScriptKvNamespaceBindingArgs
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Placements []WorkerScriptPlacementArgs
    PlainTextBindings []WorkerScriptPlainTextBindingArgs
    QueueBindings []WorkerScriptQueueBindingArgs
    R2BucketBindings []WorkerScriptR2BucketBindingArgs
    SecretTextBindings []WorkerScriptSecretTextBindingArgs
    ServiceBindings []WorkerScriptServiceBindingArgs
    Tags []string
    WebassemblyBindings []WorkerScriptWebassemblyBindingArgs
    accountId String
    The account identifier to target for the resource.
    content String
    The script content.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings List<WorkerScriptAnalyticsEngineBinding>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings List<WorkerScriptD1DatabaseBinding>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<WorkerScriptHyperdriveConfigBinding>
    kvNamespaceBindings List<WorkerScriptKvNamespaceBinding>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    placements List<WorkerScriptPlacement>
    plainTextBindings List<WorkerScriptPlainTextBinding>
    queueBindings List<WorkerScriptQueueBinding>
    r2BucketBindings List<WorkerScriptR2BucketBinding>
    secretTextBindings List<WorkerScriptSecretTextBinding>
    serviceBindings List<WorkerScriptServiceBinding>
    tags List<String>
    webassemblyBindings List<WorkerScriptWebassemblyBinding>
    accountId string
    The account identifier to target for the resource.
    content string
    The script content.
    name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings WorkerScriptAnalyticsEngineBinding[]
    compatibilityDate string
    The date to use for the compatibility flag.
    compatibilityFlags string[]
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings WorkerScriptD1DatabaseBinding[]
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings WorkerScriptHyperdriveConfigBinding[]
    kvNamespaceBindings WorkerScriptKvNamespaceBinding[]
    logpush boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module boolean
    Whether to upload Worker as a module.
    placements WorkerScriptPlacement[]
    plainTextBindings WorkerScriptPlainTextBinding[]
    queueBindings WorkerScriptQueueBinding[]
    r2BucketBindings WorkerScriptR2BucketBinding[]
    secretTextBindings WorkerScriptSecretTextBinding[]
    serviceBindings WorkerScriptServiceBinding[]
    tags string[]
    webassemblyBindings WorkerScriptWebassemblyBinding[]
    account_id str
    The account identifier to target for the resource.
    content str
    The script content.
    name str
    The name for the script. Modifying this attribute will force creation of a new resource.
    analytics_engine_bindings Sequence[WorkerScriptAnalyticsEngineBindingArgs]
    compatibility_date str
    The date to use for the compatibility flag.
    compatibility_flags Sequence[str]
    Compatibility flags used for Worker Scripts.
    d1_database_bindings Sequence[WorkerScriptD1DatabaseBindingArgs]
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    hyperdrive_config_bindings Sequence[WorkerScriptHyperdriveConfigBindingArgs]
    kv_namespace_bindings Sequence[WorkerScriptKvNamespaceBindingArgs]
    logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module bool
    Whether to upload Worker as a module.
    placements Sequence[WorkerScriptPlacementArgs]
    plain_text_bindings Sequence[WorkerScriptPlainTextBindingArgs]
    queue_bindings Sequence[WorkerScriptQueueBindingArgs]
    r2_bucket_bindings Sequence[WorkerScriptR2BucketBindingArgs]
    secret_text_bindings Sequence[WorkerScriptSecretTextBindingArgs]
    service_bindings Sequence[WorkerScriptServiceBindingArgs]
    tags Sequence[str]
    webassembly_bindings Sequence[WorkerScriptWebassemblyBindingArgs]
    accountId String
    The account identifier to target for the resource.
    content String
    The script content.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings List<Property Map>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings List<Property Map>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<Property Map>
    kvNamespaceBindings List<Property Map>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    placements List<Property Map>
    plainTextBindings List<Property Map>
    queueBindings List<Property Map>
    r2BucketBindings List<Property Map>
    secretTextBindings List<Property Map>
    serviceBindings List<Property Map>
    tags List<String>
    webassemblyBindings List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkerScript resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkerScript Resource

    Get an existing WorkerScript resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkerScriptState, opts?: CustomResourceOptions): WorkerScript
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            analytics_engine_bindings: Optional[Sequence[WorkerScriptAnalyticsEngineBindingArgs]] = None,
            compatibility_date: Optional[str] = None,
            compatibility_flags: Optional[Sequence[str]] = None,
            content: Optional[str] = None,
            d1_database_bindings: Optional[Sequence[WorkerScriptD1DatabaseBindingArgs]] = None,
            dispatch_namespace: Optional[str] = None,
            hyperdrive_config_bindings: Optional[Sequence[WorkerScriptHyperdriveConfigBindingArgs]] = None,
            kv_namespace_bindings: Optional[Sequence[WorkerScriptKvNamespaceBindingArgs]] = None,
            logpush: Optional[bool] = None,
            module: Optional[bool] = None,
            name: Optional[str] = None,
            placements: Optional[Sequence[WorkerScriptPlacementArgs]] = None,
            plain_text_bindings: Optional[Sequence[WorkerScriptPlainTextBindingArgs]] = None,
            queue_bindings: Optional[Sequence[WorkerScriptQueueBindingArgs]] = None,
            r2_bucket_bindings: Optional[Sequence[WorkerScriptR2BucketBindingArgs]] = None,
            secret_text_bindings: Optional[Sequence[WorkerScriptSecretTextBindingArgs]] = None,
            service_bindings: Optional[Sequence[WorkerScriptServiceBindingArgs]] = None,
            tags: Optional[Sequence[str]] = None,
            webassembly_bindings: Optional[Sequence[WorkerScriptWebassemblyBindingArgs]] = None) -> WorkerScript
    func GetWorkerScript(ctx *Context, name string, id IDInput, state *WorkerScriptState, opts ...ResourceOption) (*WorkerScript, error)
    public static WorkerScript Get(string name, Input<string> id, WorkerScriptState? state, CustomResourceOptions? opts = null)
    public static WorkerScript get(String name, Output<String> id, WorkerScriptState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The account identifier to target for the resource.
    AnalyticsEngineBindings List<WorkerScriptAnalyticsEngineBinding>
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags List<string>
    Compatibility flags used for Worker Scripts.
    Content string
    The script content.
    D1DatabaseBindings List<WorkerScriptD1DatabaseBinding>
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings List<WorkerScriptHyperdriveConfigBinding>
    KvNamespaceBindings List<WorkerScriptKvNamespaceBinding>
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    Placements List<WorkerScriptPlacement>
    PlainTextBindings List<WorkerScriptPlainTextBinding>
    QueueBindings List<WorkerScriptQueueBinding>
    R2BucketBindings List<WorkerScriptR2BucketBinding>
    SecretTextBindings List<WorkerScriptSecretTextBinding>
    ServiceBindings List<WorkerScriptServiceBinding>
    Tags List<string>
    WebassemblyBindings List<WorkerScriptWebassemblyBinding>
    AccountId string
    The account identifier to target for the resource.
    AnalyticsEngineBindings []WorkerScriptAnalyticsEngineBindingArgs
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags []string
    Compatibility flags used for Worker Scripts.
    Content string
    The script content.
    D1DatabaseBindings []WorkerScriptD1DatabaseBindingArgs
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings []WorkerScriptHyperdriveConfigBindingArgs
    KvNamespaceBindings []WorkerScriptKvNamespaceBindingArgs
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    Placements []WorkerScriptPlacementArgs
    PlainTextBindings []WorkerScriptPlainTextBindingArgs
    QueueBindings []WorkerScriptQueueBindingArgs
    R2BucketBindings []WorkerScriptR2BucketBindingArgs
    SecretTextBindings []WorkerScriptSecretTextBindingArgs
    ServiceBindings []WorkerScriptServiceBindingArgs
    Tags []string
    WebassemblyBindings []WorkerScriptWebassemblyBindingArgs
    accountId String
    The account identifier to target for the resource.
    analyticsEngineBindings List<WorkerScriptAnalyticsEngineBinding>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    content String
    The script content.
    d1DatabaseBindings List<WorkerScriptD1DatabaseBinding>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<WorkerScriptHyperdriveConfigBinding>
    kvNamespaceBindings List<WorkerScriptKvNamespaceBinding>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements List<WorkerScriptPlacement>
    plainTextBindings List<WorkerScriptPlainTextBinding>
    queueBindings List<WorkerScriptQueueBinding>
    r2BucketBindings List<WorkerScriptR2BucketBinding>
    secretTextBindings List<WorkerScriptSecretTextBinding>
    serviceBindings List<WorkerScriptServiceBinding>
    tags List<String>
    webassemblyBindings List<WorkerScriptWebassemblyBinding>
    accountId string
    The account identifier to target for the resource.
    analyticsEngineBindings WorkerScriptAnalyticsEngineBinding[]
    compatibilityDate string
    The date to use for the compatibility flag.
    compatibilityFlags string[]
    Compatibility flags used for Worker Scripts.
    content string
    The script content.
    d1DatabaseBindings WorkerScriptD1DatabaseBinding[]
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings WorkerScriptHyperdriveConfigBinding[]
    kvNamespaceBindings WorkerScriptKvNamespaceBinding[]
    logpush boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module boolean
    Whether to upload Worker as a module.
    name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements WorkerScriptPlacement[]
    plainTextBindings WorkerScriptPlainTextBinding[]
    queueBindings WorkerScriptQueueBinding[]
    r2BucketBindings WorkerScriptR2BucketBinding[]
    secretTextBindings WorkerScriptSecretTextBinding[]
    serviceBindings WorkerScriptServiceBinding[]
    tags string[]
    webassemblyBindings WorkerScriptWebassemblyBinding[]
    account_id str
    The account identifier to target for the resource.
    analytics_engine_bindings Sequence[WorkerScriptAnalyticsEngineBindingArgs]
    compatibility_date str
    The date to use for the compatibility flag.
    compatibility_flags Sequence[str]
    Compatibility flags used for Worker Scripts.
    content str
    The script content.
    d1_database_bindings Sequence[WorkerScriptD1DatabaseBindingArgs]
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    hyperdrive_config_bindings Sequence[WorkerScriptHyperdriveConfigBindingArgs]
    kv_namespace_bindings Sequence[WorkerScriptKvNamespaceBindingArgs]
    logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module bool
    Whether to upload Worker as a module.
    name str
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements Sequence[WorkerScriptPlacementArgs]
    plain_text_bindings Sequence[WorkerScriptPlainTextBindingArgs]
    queue_bindings Sequence[WorkerScriptQueueBindingArgs]
    r2_bucket_bindings Sequence[WorkerScriptR2BucketBindingArgs]
    secret_text_bindings Sequence[WorkerScriptSecretTextBindingArgs]
    service_bindings Sequence[WorkerScriptServiceBindingArgs]
    tags Sequence[str]
    webassembly_bindings Sequence[WorkerScriptWebassemblyBindingArgs]
    accountId String
    The account identifier to target for the resource.
    analyticsEngineBindings List<Property Map>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    content String
    The script content.
    d1DatabaseBindings List<Property Map>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<Property Map>
    kvNamespaceBindings List<Property Map>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements List<Property Map>
    plainTextBindings List<Property Map>
    queueBindings List<Property Map>
    r2BucketBindings List<Property Map>
    secretTextBindings List<Property Map>
    serviceBindings List<Property Map>
    tags List<String>
    webassemblyBindings List<Property Map>

    Supporting Types

    WorkerScriptAnalyticsEngineBinding, WorkerScriptAnalyticsEngineBindingArgs

    Dataset string
    The name of the Analytics Engine dataset to write to.
    Name string
    The global variable for the binding in your Worker code.
    Dataset string
    The name of the Analytics Engine dataset to write to.
    Name string
    The global variable for the binding in your Worker code.
    dataset String
    The name of the Analytics Engine dataset to write to.
    name String
    The global variable for the binding in your Worker code.
    dataset string
    The name of the Analytics Engine dataset to write to.
    name string
    The global variable for the binding in your Worker code.
    dataset str
    The name of the Analytics Engine dataset to write to.
    name str
    The global variable for the binding in your Worker code.
    dataset String
    The name of the Analytics Engine dataset to write to.
    name String
    The global variable for the binding in your Worker code.

    WorkerScriptD1DatabaseBinding, WorkerScriptD1DatabaseBindingArgs

    DatabaseId string
    Database ID of D1 database to use.
    Name string
    The global variable for the binding in your Worker code.
    DatabaseId string
    Database ID of D1 database to use.
    Name string
    The global variable for the binding in your Worker code.
    databaseId String
    Database ID of D1 database to use.
    name String
    The global variable for the binding in your Worker code.
    databaseId string
    Database ID of D1 database to use.
    name string
    The global variable for the binding in your Worker code.
    database_id str
    Database ID of D1 database to use.
    name str
    The global variable for the binding in your Worker code.
    databaseId String
    Database ID of D1 database to use.
    name String
    The global variable for the binding in your Worker code.

    WorkerScriptHyperdriveConfigBinding, WorkerScriptHyperdriveConfigBindingArgs

    Binding string
    The global variable for the binding in your Worker code.
    Id string
    The ID of the Hyperdrive config to use.
    Binding string
    The global variable for the binding in your Worker code.
    Id string
    The ID of the Hyperdrive config to use.
    binding String
    The global variable for the binding in your Worker code.
    id String
    The ID of the Hyperdrive config to use.
    binding string
    The global variable for the binding in your Worker code.
    id string
    The ID of the Hyperdrive config to use.
    binding str
    The global variable for the binding in your Worker code.
    id str
    The ID of the Hyperdrive config to use.
    binding String
    The global variable for the binding in your Worker code.
    id String
    The ID of the Hyperdrive config to use.

    WorkerScriptKvNamespaceBinding, WorkerScriptKvNamespaceBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    NamespaceId string
    ID of the KV namespace you want to use.
    Name string
    The global variable for the binding in your Worker code.
    NamespaceId string
    ID of the KV namespace you want to use.
    name String
    The global variable for the binding in your Worker code.
    namespaceId String
    ID of the KV namespace you want to use.
    name string
    The global variable for the binding in your Worker code.
    namespaceId string
    ID of the KV namespace you want to use.
    name str
    The global variable for the binding in your Worker code.
    namespace_id str
    ID of the KV namespace you want to use.
    name String
    The global variable for the binding in your Worker code.
    namespaceId String
    ID of the KV namespace you want to use.

    WorkerScriptPlacement, WorkerScriptPlacementArgs

    Mode string
    The placement mode for the Worker. Available values: smart.
    Mode string
    The placement mode for the Worker. Available values: smart.
    mode String
    The placement mode for the Worker. Available values: smart.
    mode string
    The placement mode for the Worker. Available values: smart.
    mode str
    The placement mode for the Worker. Available values: smart.
    mode String
    The placement mode for the Worker. Available values: smart.

    WorkerScriptPlainTextBinding, WorkerScriptPlainTextBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Text string
    The plain text you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Text string
    The plain text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The plain text you want to store.
    name string
    The global variable for the binding in your Worker code.
    text string
    The plain text you want to store.
    name str
    The global variable for the binding in your Worker code.
    text str
    The plain text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The plain text you want to store.

    WorkerScriptQueueBinding, WorkerScriptQueueBindingArgs

    Binding string
    The name of the global variable for the binding in your Worker code.
    Queue string
    Name of the queue you want to use.
    Binding string
    The name of the global variable for the binding in your Worker code.
    Queue string
    Name of the queue you want to use.
    binding String
    The name of the global variable for the binding in your Worker code.
    queue String
    Name of the queue you want to use.
    binding string
    The name of the global variable for the binding in your Worker code.
    queue string
    Name of the queue you want to use.
    binding str
    The name of the global variable for the binding in your Worker code.
    queue str
    Name of the queue you want to use.
    binding String
    The name of the global variable for the binding in your Worker code.
    queue String
    Name of the queue you want to use.

    WorkerScriptR2BucketBinding, WorkerScriptR2BucketBindingArgs

    BucketName string
    The name of the Bucket to bind to.
    Name string
    The global variable for the binding in your Worker code.
    BucketName string
    The name of the Bucket to bind to.
    Name string
    The global variable for the binding in your Worker code.
    bucketName String
    The name of the Bucket to bind to.
    name String
    The global variable for the binding in your Worker code.
    bucketName string
    The name of the Bucket to bind to.
    name string
    The global variable for the binding in your Worker code.
    bucket_name str
    The name of the Bucket to bind to.
    name str
    The global variable for the binding in your Worker code.
    bucketName String
    The name of the Bucket to bind to.
    name String
    The global variable for the binding in your Worker code.

    WorkerScriptSecretTextBinding, WorkerScriptSecretTextBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Text string
    The secret text you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Text string
    The secret text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The secret text you want to store.
    name string
    The global variable for the binding in your Worker code.
    text string
    The secret text you want to store.
    name str
    The global variable for the binding in your Worker code.
    text str
    The secret text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The secret text you want to store.

    WorkerScriptServiceBinding, WorkerScriptServiceBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Service string
    The name of the Worker to bind to.
    Environment string
    The name of the Worker environment to bind to.
    Name string
    The global variable for the binding in your Worker code.
    Service string
    The name of the Worker to bind to.
    Environment string
    The name of the Worker environment to bind to.
    name String
    The global variable for the binding in your Worker code.
    service String
    The name of the Worker to bind to.
    environment String
    The name of the Worker environment to bind to.
    name string
    The global variable for the binding in your Worker code.
    service string
    The name of the Worker to bind to.
    environment string
    The name of the Worker environment to bind to.
    name str
    The global variable for the binding in your Worker code.
    service str
    The name of the Worker to bind to.
    environment str
    The name of the Worker environment to bind to.
    name String
    The global variable for the binding in your Worker code.
    service String
    The name of the Worker to bind to.
    environment String
    The name of the Worker environment to bind to.

    WorkerScriptWebassemblyBinding, WorkerScriptWebassemblyBindingArgs

    Module string
    The base64 encoded wasm module you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Module string
    The base64 encoded wasm module you want to store.
    Name string
    The global variable for the binding in your Worker code.
    module String
    The base64 encoded wasm module you want to store.
    name String
    The global variable for the binding in your Worker code.
    module string
    The base64 encoded wasm module you want to store.
    name string
    The global variable for the binding in your Worker code.
    module str
    The base64 encoded wasm module you want to store.
    name str
    The global variable for the binding in your Worker code.
    module String
    The base64 encoded wasm module you want to store.
    name String
    The global variable for the binding in your Worker code.

    Import

    $ pulumi import cloudflare:index/workerScript:WorkerScript example <account_id>/<script_name>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi