1. Packages
  2. Splight
  3. API Docs
  4. Secret
splight v1.2.13 published on Friday, Feb 14, 2025 by splightplatform

splight.Secret

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as splight from "@splightplatform/pulumi-splight";

const mySecret = new splight.Secret("mySecret", {rawValue: "My Secret Value"});
Copy
import pulumi
import pulumi_splight as splight

my_secret = splight.Secret("mySecret", raw_value="My Secret Value")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/splightplatform/pulumi-splight/sdk/go/splight"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := splight.NewSecret(ctx, "mySecret", &splight.SecretArgs{
			RawValue: pulumi.String("My Secret Value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Splight = Splight.Splight;

return await Deployment.RunAsync(() => 
{
    var mySecret = new Splight.Secret("mySecret", new()
    {
        RawValue = "My Secret Value",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.splight.Secret;
import com.pulumi.splight.SecretArgs;
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 Secret("mySecret", SecretArgs.builder()
            .rawValue("My Secret Value")
            .build());

    }
}
Copy
resources:
  mySecret:
    type: splight:Secret
    properties:
      rawValue: My Secret Value
Copy

Create Secret Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
@overload
def Secret(resource_name: str,
           args: SecretArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Secret(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           raw_value: Optional[str] = None,
           name: Optional[str] = None)
func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: splight:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SecretArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SecretArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SecretArgs
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 secretResource = new Splight.Secret("secretResource", new()
{
    RawValue = "string",
    Name = "string",
});
Copy
example, err := splight.NewSecret(ctx, "secretResource", &splight.SecretArgs{
	RawValue: pulumi.String("string"),
	Name:     pulumi.String("string"),
})
Copy
var secretResource = new Secret("secretResource", SecretArgs.builder()
    .rawValue("string")
    .name("string")
    .build());
Copy
secret_resource = splight.Secret("secretResource",
    raw_value="string",
    name="string")
Copy
const secretResource = new splight.Secret("secretResource", {
    rawValue: "string",
    name: "string",
});
Copy
type: splight:Secret
properties:
    name: string
    rawValue: string
Copy

Secret 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 Secret resource accepts the following input properties:

RawValue This property is required. string
Name string
RawValue This property is required. string
Name string
rawValue This property is required. String
name String
rawValue This property is required. string
name string
raw_value This property is required. str
name str
rawValue This property is required. String
name String

Outputs

All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Value string
Id string
The provider-assigned unique ID for this managed resource.
Value string
id String
The provider-assigned unique ID for this managed resource.
value String
id string
The provider-assigned unique ID for this managed resource.
value string
id str
The provider-assigned unique ID for this managed resource.
value str
id String
The provider-assigned unique ID for this managed resource.
value String

Look up Existing Secret Resource

Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        raw_value: Optional[str] = None,
        value: Optional[str] = None) -> Secret
func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)
public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)
public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)
resources:  _:    type: splight:Secret    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Name string
RawValue string
Value string
Name string
RawValue string
Value string
name String
rawValue String
value String
name string
rawValue string
value string
name str
raw_value str
value str
name String
rawValue String
value String

Import

$ pulumi import splight:index/secret:Secret [options] splight_secret.<name> <secret_id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
splight splightplatform/pulumi-splight
License
Apache-2.0
Notes
This Pulumi package is based on the splight Terraform Provider.