WorkersKv

class WorkersKv : KotlinCustomResource

Provides a resource to manage a Cloudflare Workers KV Pair.

This resource uses the Cloudflare account APIs. This requires setting the CLOUDFLARE_ACCOUNT_ID environment variable or account_id provider argument if you do not explicitly set the resource level account_id value.

Example Usage

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.WorkersKv;
import com.pulumi.cloudflare.WorkersKvArgs;
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 exampleNs = new WorkersKvNamespace("exampleNs", WorkersKvNamespaceArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.title("test-namespace")
.build());
var example = new WorkersKv("example", WorkersKvArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.namespaceId(exampleNs.id())
.key("test-key")
.value("test value")
.build());
}
}

Import

$ pulumi import cloudflare:index/workersKv:WorkersKv example <account_id>/<namespace_id>/<key_name>

Properties

Link copied to clipboard
val accountId: Output<String>

The account identifier to target for the resource.

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

Name of the KV pair. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val namespaceId: Output<String>

The ID of the Workers KV namespace in which you want to create the KV pair. Modifying this attribute will force creation of a new resource.

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

Value of the KV pair.