1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorkersSecret
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getWorkersSecret

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
    Deprecated: cloudflare.getWorkersSecret has been deprecated in favor of cloudflare.getWorkersForPlatformsScriptSecret

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersForPlatformsScriptSecret = cloudflare.getWorkersForPlatformsScriptSecret({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        dispatchNamespace: "my-dispatch-namespace",
        scriptName: "this-is_my_script-01",
        secretName: "mySecret",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_for_platforms_script_secret = cloudflare.get_workers_for_platforms_script_secret(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        dispatch_namespace="my-dispatch-namespace",
        script_name="this-is_my_script-01",
        secret_name="mySecret")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupWorkersForPlatformsScriptSecret(ctx, &cloudflare.LookupWorkersForPlatformsScriptSecretArgs{
    			AccountId:         "023e105f4ecef8ad9ca31a8372d0c353",
    			DispatchNamespace: "my-dispatch-namespace",
    			ScriptName:        "this-is_my_script-01",
    			SecretName:        pulumi.StringRef("mySecret"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleWorkersForPlatformsScriptSecret = Cloudflare.GetWorkersForPlatformsScriptSecret.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            DispatchNamespace = "my-dispatch-namespace",
            ScriptName = "this-is_my_script-01",
            SecretName = "mySecret",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetWorkersForPlatformsScriptSecretArgs;
    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) {
            final var exampleWorkersForPlatformsScriptSecret = CloudflareFunctions.getWorkersForPlatformsScriptSecret(GetWorkersForPlatformsScriptSecretArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .dispatchNamespace("my-dispatch-namespace")
                .scriptName("this-is_my_script-01")
                .secretName("mySecret")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersForPlatformsScriptSecret:
        fn::invoke:
          function: cloudflare:getWorkersForPlatformsScriptSecret
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            dispatchNamespace: my-dispatch-namespace
            scriptName: this-is_my_script-01
            secretName: mySecret
    

    Using getWorkersSecret

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getWorkersSecret(args: GetWorkersSecretArgs, opts?: InvokeOptions): Promise<GetWorkersSecretResult>
    function getWorkersSecretOutput(args: GetWorkersSecretOutputArgs, opts?: InvokeOptions): Output<GetWorkersSecretResult>
    def get_workers_secret(account_id: Optional[str] = None,
                           dispatch_namespace: Optional[str] = None,
                           script_name: Optional[str] = None,
                           secret_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetWorkersSecretResult
    def get_workers_secret_output(account_id: Optional[pulumi.Input[str]] = None,
                           dispatch_namespace: Optional[pulumi.Input[str]] = None,
                           script_name: Optional[pulumi.Input[str]] = None,
                           secret_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetWorkersSecretResult]
    func LookupWorkersSecret(ctx *Context, args *LookupWorkersSecretArgs, opts ...InvokeOption) (*LookupWorkersSecretResult, error)
    func LookupWorkersSecretOutput(ctx *Context, args *LookupWorkersSecretOutputArgs, opts ...InvokeOption) LookupWorkersSecretResultOutput

    > Note: This function is named LookupWorkersSecret in the Go SDK.

    public static class GetWorkersSecret 
    {
        public static Task<GetWorkersSecretResult> InvokeAsync(GetWorkersSecretArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersSecretResult> Invoke(GetWorkersSecretInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersSecretResult> getWorkersSecret(GetWorkersSecretArgs args, InvokeOptions options)
    public static Output<GetWorkersSecretResult> getWorkersSecret(GetWorkersSecretArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersSecret:getWorkersSecret
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier.
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    ScriptName string
    Name of the script, used in URLs and route configuration.
    SecretName string
    A JavaScript variable name for the secret binding.
    AccountId string
    Identifier.
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    ScriptName string
    Name of the script, used in URLs and route configuration.
    SecretName string
    A JavaScript variable name for the secret binding.
    accountId String
    Identifier.
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    scriptName String
    Name of the script, used in URLs and route configuration.
    secretName String
    A JavaScript variable name for the secret binding.
    accountId string
    Identifier.
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    scriptName string
    Name of the script, used in URLs and route configuration.
    secretName string
    A JavaScript variable name for the secret binding.
    account_id str
    Identifier.
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    script_name str
    Name of the script, used in URLs and route configuration.
    secret_name str
    A JavaScript variable name for the secret binding.
    accountId String
    Identifier.
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    scriptName String
    Name of the script, used in URLs and route configuration.
    secretName String
    A JavaScript variable name for the secret binding.

    getWorkersSecret Result

    The following output properties are available:

    AccountId string
    Identifier.
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    Id string
    A JavaScript variable name for the secret binding.
    Name string
    The name of this secret, this is what will be used to access it inside the Worker.
    ScriptName string
    Name of the script, used in URLs and route configuration.
    Type string
    The type of secret. Available values: "secret_text".
    SecretName string
    A JavaScript variable name for the secret binding.
    AccountId string
    Identifier.
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    Id string
    A JavaScript variable name for the secret binding.
    Name string
    The name of this secret, this is what will be used to access it inside the Worker.
    ScriptName string
    Name of the script, used in URLs and route configuration.
    Type string
    The type of secret. Available values: "secret_text".
    SecretName string
    A JavaScript variable name for the secret binding.
    accountId String
    Identifier.
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    id String
    A JavaScript variable name for the secret binding.
    name String
    The name of this secret, this is what will be used to access it inside the Worker.
    scriptName String
    Name of the script, used in URLs and route configuration.
    type String
    The type of secret. Available values: "secret_text".
    secretName String
    A JavaScript variable name for the secret binding.
    accountId string
    Identifier.
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    id string
    A JavaScript variable name for the secret binding.
    name string
    The name of this secret, this is what will be used to access it inside the Worker.
    scriptName string
    Name of the script, used in URLs and route configuration.
    type string
    The type of secret. Available values: "secret_text".
    secretName string
    A JavaScript variable name for the secret binding.
    account_id str
    Identifier.
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    id str
    A JavaScript variable name for the secret binding.
    name str
    The name of this secret, this is what will be used to access it inside the Worker.
    script_name str
    Name of the script, used in URLs and route configuration.
    type str
    The type of secret. Available values: "secret_text".
    secret_name str
    A JavaScript variable name for the secret binding.
    accountId String
    Identifier.
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    id String
    A JavaScript variable name for the secret binding.
    name String
    The name of this secret, this is what will be used to access it inside the Worker.
    scriptName String
    Name of the script, used in URLs and route configuration.
    type String
    The type of secret. Available values: "secret_text".
    secretName String
    A JavaScript variable name for the secret binding.

    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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi