WorkerSecret

class WorkerSecret : KotlinCustomResource

Deprecated

cloudflare.index/workersecret.WorkerSecret has been deprecated in favor of cloudflare.index/workerssecret.WorkersSecret

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersSecret = new cloudflare.WorkersSecret("example_workers_secret", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
dispatchNamespace: "my-dispatch-namespace",
scriptName: "this-is_my_script-01",
name: "MY_SECRET",
text: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
type: "secret_text",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_secret = cloudflare.WorkersSecret("example_workers_secret",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
script_name="this-is_my_script-01",
name="MY_SECRET",
text="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
type="secret_text")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleWorkersSecret = new Cloudflare.WorkersSecret("example_workers_secret", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
DispatchNamespace = "my-dispatch-namespace",
ScriptName = "this-is_my_script-01",
Name = "MY_SECRET",
Text = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
Type = "secret_text",
});
});
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.NewWorkersSecret(ctx, "example_workers_secret", &cloudflare.WorkersSecretArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
DispatchNamespace: pulumi.String("my-dispatch-namespace"),
ScriptName: pulumi.String("this-is_my_script-01"),
Name: pulumi.String("MY_SECRET"),
Text: pulumi.String("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"),
Type: pulumi.String("secret_text"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersSecret;
import com.pulumi.cloudflare.WorkersSecretArgs;
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 exampleWorkersSecret = new WorkersSecret("exampleWorkersSecret", WorkersSecretArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.dispatchNamespace("my-dispatch-namespace")
.scriptName("this-is_my_script-01")
.name("MY_SECRET")
.text("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")
.type("secret_text")
.build());
}
}
resources:
exampleWorkersSecret:
type: cloudflare:WorkersSecret
name: example_workers_secret
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
dispatchNamespace: my-dispatch-namespace
scriptName: this-is_my_script-01
name: MY_SECRET
text: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
type: secret_text

Import

$ pulumi import cloudflare:index/workerSecret:WorkerSecret example '<account_id>/<dispatch_namespace>/<script_name>/<secret_name>'

Properties

Link copied to clipboard
val accountId: Output<String>

Identifier

Link copied to clipboard

Name of the Workers for Platforms dispatch namespace.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of this secret, this is what will be used to access it inside the Worker.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scriptName: Output<String>

Name of the script, used in URLs and route configuration.

Link copied to clipboard
val text: Output<String>?

The value of the secret.

Link copied to clipboard
val type: Output<String>?

The type of secret to put. Available values: "secret_text".

Link copied to clipboard
val urn: Output<String>