cloudflare.WorkersForPlatformsScriptSecret
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersForPlatformsScriptSecret = new cloudflare.WorkersForPlatformsScriptSecret("example_workers_for_platforms_script_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_for_platforms_script_secret = cloudflare.WorkersForPlatformsScriptSecret("example_workers_for_platforms_script_secret",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
script_name="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.NewWorkersForPlatformsScriptSecret(ctx, "example_workers_for_platforms_script_secret", &cloudflare.WorkersForPlatformsScriptSecretArgs{
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleWorkersForPlatformsScriptSecret = new Cloudflare.WorkersForPlatformsScriptSecret("example_workers_for_platforms_script_secret", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
DispatchNamespace = "my-dispatch-namespace",
ScriptName = "this-is_my_script-01",
Name = "MY_SECRET",
Text = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
Type = "secret_text",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersForPlatformsScriptSecret;
import com.pulumi.cloudflare.WorkersForPlatformsScriptSecretArgs;
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 exampleWorkersForPlatformsScriptSecret = new WorkersForPlatformsScriptSecret("exampleWorkersForPlatformsScriptSecret", WorkersForPlatformsScriptSecretArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.dispatchNamespace("my-dispatch-namespace")
.scriptName("this-is_my_script-01")
.name("MY_SECRET")
.text("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")
.type("secret_text")
.build());
}
}
resources:
exampleWorkersForPlatformsScriptSecret:
type: cloudflare:WorkersForPlatformsScriptSecret
name: example_workers_for_platforms_script_secret
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
dispatchNamespace: my-dispatch-namespace
scriptName: this-is_my_script-01
name: MY_SECRET
text: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
type: secret_text
Create WorkersForPlatformsScriptSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkersForPlatformsScriptSecret(name: string, args: WorkersForPlatformsScriptSecretArgs, opts?: CustomResourceOptions);
@overload
def WorkersForPlatformsScriptSecret(resource_name: str,
args: WorkersForPlatformsScriptSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkersForPlatformsScriptSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
dispatch_namespace: Optional[str] = None,
name: Optional[str] = None,
script_name: Optional[str] = None,
text: Optional[str] = None,
type: Optional[str] = None)
func NewWorkersForPlatformsScriptSecret(ctx *Context, name string, args WorkersForPlatformsScriptSecretArgs, opts ...ResourceOption) (*WorkersForPlatformsScriptSecret, error)
public WorkersForPlatformsScriptSecret(string name, WorkersForPlatformsScriptSecretArgs args, CustomResourceOptions? opts = null)
public WorkersForPlatformsScriptSecret(String name, WorkersForPlatformsScriptSecretArgs args)
public WorkersForPlatformsScriptSecret(String name, WorkersForPlatformsScriptSecretArgs args, CustomResourceOptions options)
type: cloudflare:WorkersForPlatformsScriptSecret
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 WorkersForPlatformsScriptSecretArgs
- 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 WorkersForPlatformsScriptSecretArgs
- 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 WorkersForPlatformsScriptSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkersForPlatformsScriptSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkersForPlatformsScriptSecretArgs
- 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 workersForPlatformsScriptSecretResource = new Cloudflare.WorkersForPlatformsScriptSecret("workersForPlatformsScriptSecretResource", new()
{
AccountId = "string",
DispatchNamespace = "string",
Name = "string",
ScriptName = "string",
Text = "string",
Type = "string",
});
example, err := cloudflare.NewWorkersForPlatformsScriptSecret(ctx, "workersForPlatformsScriptSecretResource", &cloudflare.WorkersForPlatformsScriptSecretArgs{
AccountId: pulumi.String("string"),
DispatchNamespace: pulumi.String("string"),
Name: pulumi.String("string"),
ScriptName: pulumi.String("string"),
Text: pulumi.String("string"),
Type: pulumi.String("string"),
})
var workersForPlatformsScriptSecretResource = new WorkersForPlatformsScriptSecret("workersForPlatformsScriptSecretResource", WorkersForPlatformsScriptSecretArgs.builder()
.accountId("string")
.dispatchNamespace("string")
.name("string")
.scriptName("string")
.text("string")
.type("string")
.build());
workers_for_platforms_script_secret_resource = cloudflare.WorkersForPlatformsScriptSecret("workersForPlatformsScriptSecretResource",
account_id="string",
dispatch_namespace="string",
name="string",
script_name="string",
text="string",
type="string")
const workersForPlatformsScriptSecretResource = new cloudflare.WorkersForPlatformsScriptSecret("workersForPlatformsScriptSecretResource", {
accountId: "string",
dispatchNamespace: "string",
name: "string",
scriptName: "string",
text: "string",
type: "string",
});
type: cloudflare:WorkersForPlatformsScriptSecret
properties:
accountId: string
dispatchNamespace: string
name: string
scriptName: string
text: string
type: string
WorkersForPlatformsScriptSecret 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 WorkersForPlatformsScriptSecret resource accepts the following input properties:
- Account
Id string - Identifier.
- Dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- Name string
- The name of this secret, this is what will be used to access it inside the Worker.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Text string
- The value of the secret.
- Type string
- The type of secret to put. Available values: "secret_text".
- Account
Id string - Identifier.
- Dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- Name string
- The name of this secret, this is what will be used to access it inside the Worker.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Text string
- The value of the secret.
- Type string
- The type of secret to put. Available values: "secret_text".
- account
Id String - Identifier.
- dispatch
Namespace String - Name of the Workers for Platforms dispatch namespace.
- name String
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name String - Name of the script, used in URLs and route configuration.
- text String
- The value of the secret.
- type String
- The type of secret to put. Available values: "secret_text".
- account
Id string - Identifier.
- dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- name string
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name string - Name of the script, used in URLs and route configuration.
- text string
- The value of the secret.
- type string
- The type of secret to put. Available values: "secret_text".
- account_
id str - Identifier.
- dispatch_
namespace str - Name of the Workers for Platforms dispatch namespace.
- 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.
- text str
- The value of the secret.
- type str
- The type of secret to put. Available values: "secret_text".
- account
Id String - Identifier.
- dispatch
Namespace String - Name of the Workers for Platforms dispatch namespace.
- name String
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name String - Name of the script, used in URLs and route configuration.
- text String
- The value of the secret.
- type String
- The type of secret to put. Available values: "secret_text".
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkersForPlatformsScriptSecret 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 WorkersForPlatformsScriptSecret Resource
Get an existing WorkersForPlatformsScriptSecret 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?: WorkersForPlatformsScriptSecretState, opts?: CustomResourceOptions): WorkersForPlatformsScriptSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
dispatch_namespace: Optional[str] = None,
name: Optional[str] = None,
script_name: Optional[str] = None,
text: Optional[str] = None,
type: Optional[str] = None) -> WorkersForPlatformsScriptSecret
func GetWorkersForPlatformsScriptSecret(ctx *Context, name string, id IDInput, state *WorkersForPlatformsScriptSecretState, opts ...ResourceOption) (*WorkersForPlatformsScriptSecret, error)
public static WorkersForPlatformsScriptSecret Get(string name, Input<string> id, WorkersForPlatformsScriptSecretState? state, CustomResourceOptions? opts = null)
public static WorkersForPlatformsScriptSecret get(String name, Output<String> id, WorkersForPlatformsScriptSecretState state, CustomResourceOptions options)
resources: _: type: cloudflare:WorkersForPlatformsScriptSecret get: id: ${id}
- 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.
- Account
Id string - Identifier.
- Dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- Name string
- The name of this secret, this is what will be used to access it inside the Worker.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Text string
- The value of the secret.
- Type string
- The type of secret to put. Available values: "secret_text".
- Account
Id string - Identifier.
- Dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- Name string
- The name of this secret, this is what will be used to access it inside the Worker.
- Script
Name string - Name of the script, used in URLs and route configuration.
- Text string
- The value of the secret.
- Type string
- The type of secret to put. Available values: "secret_text".
- account
Id String - Identifier.
- dispatch
Namespace String - Name of the Workers for Platforms dispatch namespace.
- name String
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name String - Name of the script, used in URLs and route configuration.
- text String
- The value of the secret.
- type String
- The type of secret to put. Available values: "secret_text".
- account
Id string - Identifier.
- dispatch
Namespace string - Name of the Workers for Platforms dispatch namespace.
- name string
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name string - Name of the script, used in URLs and route configuration.
- text string
- The value of the secret.
- type string
- The type of secret to put. Available values: "secret_text".
- account_
id str - Identifier.
- dispatch_
namespace str - Name of the Workers for Platforms dispatch namespace.
- 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.
- text str
- The value of the secret.
- type str
- The type of secret to put. Available values: "secret_text".
- account
Id String - Identifier.
- dispatch
Namespace String - Name of the Workers for Platforms dispatch namespace.
- name String
- The name of this secret, this is what will be used to access it inside the Worker.
- script
Name String - Name of the script, used in URLs and route configuration.
- text String
- The value of the secret.
- type String
- The type of secret to put. Available values: "secret_text".
Import
$ pulumi import cloudflare:index/workersForPlatformsScriptSecret:WorkersForPlatformsScriptSecret example '<account_id>/<dispatch_namespace>/<script_name>/<secret_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.