WorkerSecretArgs

data class WorkerSecretArgs(val accountId: Output<String>? = null, val name: Output<String>? = null, val scriptName: Output<String>? = null, val secretText: Output<String>? = null) : ConvertibleToJava<WorkerSecretArgs>

Provides a Cloudflare Worker secret resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const mySecret = new cloudflare.WorkerSecret("my_secret", {
accountId: "f037e56e89293a057740de681ac9abbe",
name: "MY_EXAMPLE_SECRET_TEXT",
scriptName: "script_1",
secretText: "my_secret_value",
});
import pulumi
import pulumi_cloudflare as cloudflare
my_secret = cloudflare.WorkerSecret("my_secret",
account_id="f037e56e89293a057740de681ac9abbe",
name="MY_EXAMPLE_SECRET_TEXT",
script_name="script_1",
secret_text="my_secret_value")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var mySecret = new Cloudflare.WorkerSecret("my_secret", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
Name = "MY_EXAMPLE_SECRET_TEXT",
ScriptName = "script_1",
SecretText = "my_secret_value",
});
});
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewWorkerSecret(ctx, "my_secret", &cloudflare.WorkerSecretArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
Name: pulumi.String("MY_EXAMPLE_SECRET_TEXT"),
ScriptName: pulumi.String("script_1"),
SecretText: pulumi.String("my_secret_value"),
})
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.WorkerSecret;
import com.pulumi.cloudflare.WorkerSecretArgs;
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 mySecret = new WorkerSecret("mySecret", WorkerSecretArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("MY_EXAMPLE_SECRET_TEXT")
.scriptName("script_1")
.secretText("my_secret_value")
.build());
}
}
resources:
mySecret:
type: cloudflare:WorkerSecret
name: my_secret
properties:
accountId: f037e56e89293a057740de681ac9abbe
name: MY_EXAMPLE_SECRET_TEXT
scriptName: script_1
secretText: my_secret_value

Import

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

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, name: Output<String>? = null, scriptName: Output<String>? = null, secretText: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The account identifier to target for the resource.

Link copied to clipboard
val name: Output<String>? = null

The name of the Worker secret. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val scriptName: Output<String>? = null

The name of the Worker script to associate the secret with. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val secretText: Output<String>? = null

The text of the Worker secret. Modifying this attribute will force creation of a new resource.

Functions

Link copied to clipboard
open override fun toJava(): WorkerSecretArgs