published on Thursday, Aug 20, 2026 by jschady
published on Thursday, Aug 20, 2026 by jschady
A Secret stores named, typed secret material for later use by features that reference the Secret by ID.
Secret values are encrypted at rest and are write-only. API responses include metadata and configured value field names, but never include the stored secret values.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as filescom from "pulumi-filescom";
const exampleSecret = new filescom.Secret("example_secret", {
name: "Production API token",
description: "Used by production API integrations.",
secretType: "token",
metadata: {
key: "example value",
},
workspaceId: 0,
});
import pulumi
import pulumi_filescom as filescom
example_secret = filescom.Secret("example_secret",
name="Production API token",
description="Used by production API integrations.",
secret_type="token",
metadata={
"key": "example value",
},
workspace_id=0)
package main
import (
"github.com/jschady/pulumi-filescom/sdk/go/filescom"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := filescom.NewSecret(ctx, "example_secret", &filescom.SecretArgs{
Name: pulumi.String("Production API token"),
Description: pulumi.String("Used by production API integrations."),
SecretType: pulumi.String("token"),
Metadata: pulumi.Any(map[string]interface{}{
"key": "example value",
}),
WorkspaceId: pulumi.Int(0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Filescom = Jschady.Filescom;
return await Deployment.RunAsync(() =>
{
var exampleSecret = new Filescom.Secret("example_secret", new()
{
Name = "Production API token",
Description = "Used by production API integrations.",
SecretType = "token",
Metadata = new Dictionary<string, object?>
{
["key"] = "example value",
},
WorkspaceId = 0,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.filescom.Secret;
import com.pulumi.filescom.SecretArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleSecret = new Secret("exampleSecret", SecretArgs.builder()
.name("Production API token")
.description("Used by production API integrations.")
.secretType("token")
.metadata(Map.of("key", "example value"))
.workspaceId(0)
.build());
}
}
resources:
exampleSecret:
type: filescom:Secret
name: example_secret
properties:
name: Production API token
description: Used by production API integrations.
secretType: token
metadata:
key: example value
workspaceId: 0
pulumi {
required_providers {
filescom = {
source = "pulumi/filescom"
}
}
}
resource "filescom_secret" "example_secret" {
name = "Production API token"
description = "Used by production API integrations."
secret_type = "token"
metadata = {
"key" = "example value"
}
workspace_id = 0
}
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,
secret_type: Optional[str] = None,
description: Optional[str] = None,
metadata: Optional[Any] = None,
name: Optional[str] = None,
workspace_id: Optional[int] = 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: filescom:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "filescom_secret" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SecretArgs
- 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 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 string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 Filescom.Secret("secretResource", new()
{
SecretType = "string",
Description = "string",
Metadata = "any",
Name = "string",
WorkspaceId = 0,
});
example, err := filescom.NewSecret(ctx, "secretResource", &filescom.SecretArgs{
SecretType: pulumi.String("string"),
Description: pulumi.String("string"),
Metadata: pulumi.Any("any"),
Name: pulumi.String("string"),
WorkspaceId: pulumi.Int(0),
})
resource "filescom_secret" "secretResource" {
lifecycle {
create_before_destroy = true
}
secret_type = "string"
description = "string"
metadata = "any"
name = "string"
workspace_id = 0
}
var secretResource = new Secret("secretResource", SecretArgs.builder()
.secretType("string")
.description("string")
.metadata("any")
.name("string")
.workspaceId(0)
.build());
secret_resource = filescom.Secret("secretResource",
secret_type="string",
description="string",
metadata="any",
name="string",
workspace_id=0)
const secretResource = new filescom.Secret("secretResource", {
secretType: "string",
description: "string",
metadata: "any",
name: "string",
workspaceId: 0,
});
type: filescom:Secret
properties:
description: string
metadata: any
name: string
secretType: string
workspaceId: 0
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:
- Secret
Type string - Secret type.
- Description string
- Internal description for your reference.
- Metadata object
- Non-secret metadata for the Secret type.
- Name string
- Secret name.
- Workspace
Id int - Workspace ID. 0 means the default workspace.
- Secret
Type string - Secret type.
- Description string
- Internal description for your reference.
- Metadata interface{}
- Non-secret metadata for the Secret type.
- Name string
- Secret name.
- Workspace
Id int - Workspace ID. 0 means the default workspace.
- secret_
type string - Secret type.
- description string
- Internal description for your reference.
- metadata any
- Non-secret metadata for the Secret type.
- name string
- Secret name.
- workspace_
id number - Workspace ID. 0 means the default workspace.
- secret
Type String - Secret type.
- description String
- Internal description for your reference.
- metadata Object
- Non-secret metadata for the Secret type.
- name String
- Secret name.
- workspace
Id Integer - Workspace ID. 0 means the default workspace.
- secret
Type string - Secret type.
- description string
- Internal description for your reference.
- metadata any
- Non-secret metadata for the Secret type.
- name string
- Secret name.
- workspace
Id number - Workspace ID. 0 means the default workspace.
- secret_
type str - Secret type.
- description str
- Internal description for your reference.
- metadata Any
- Non-secret metadata for the Secret type.
- name str
- Secret name.
- workspace_
id int - Workspace ID. 0 means the default workspace.
- secret
Type String - Secret type.
- description String
- Internal description for your reference.
- metadata Any
- Non-secret metadata for the Secret type.
- name String
- Secret name.
- workspace
Id Number - Workspace ID. 0 means the default workspace.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Created
At string - Secret create date/time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - Secret update date/time.
- Value
Field List<string>Names - Names of configured secret value fields. Secret values are never returned.
- Created
At string - Secret create date/time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
At string - Secret update date/time.
- Value
Field []stringNames - Names of configured secret value fields. Secret values are never returned.
- created_
at string - Secret create date/time.
- id string
- The provider-assigned unique ID for this managed resource.
- updated_
at string - Secret update date/time.
- value_
field_ list(string)names - Names of configured secret value fields. Secret values are never returned.
- created
At String - Secret create date/time.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - Secret update date/time.
- value
Field List<String>Names - Names of configured secret value fields. Secret values are never returned.
- created
At string - Secret create date/time.
- id string
- The provider-assigned unique ID for this managed resource.
- updated
At string - Secret update date/time.
- value
Field string[]Names - Names of configured secret value fields. Secret values are never returned.
- created_
at str - Secret create date/time.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - Secret update date/time.
- value_
field_ Sequence[str]names - Names of configured secret value fields. Secret values are never returned.
- created
At String - Secret create date/time.
- id String
- The provider-assigned unique ID for this managed resource.
- updated
At String - Secret update date/time.
- value
Field List<String>Names - Names of configured secret value fields. Secret values are never returned.
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,
created_at: Optional[str] = None,
description: Optional[str] = None,
metadata: Optional[Any] = None,
name: Optional[str] = None,
secret_type: Optional[str] = None,
updated_at: Optional[str] = None,
value_field_names: Optional[Sequence[str]] = None,
workspace_id: Optional[int] = None) -> Secretfunc 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: filescom:Secret get: id: ${id}import {
to = filescom_secret.example
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.
- Created
At string - Secret create date/time.
- Description string
- Internal description for your reference.
- Metadata object
- Non-secret metadata for the Secret type.
- Name string
- Secret name.
- Secret
Type string - Secret type.
- Updated
At string - Secret update date/time.
- Value
Field List<string>Names - Names of configured secret value fields. Secret values are never returned.
- Workspace
Id int - Workspace ID. 0 means the default workspace.
- Created
At string - Secret create date/time.
- Description string
- Internal description for your reference.
- Metadata interface{}
- Non-secret metadata for the Secret type.
- Name string
- Secret name.
- Secret
Type string - Secret type.
- Updated
At string - Secret update date/time.
- Value
Field []stringNames - Names of configured secret value fields. Secret values are never returned.
- Workspace
Id int - Workspace ID. 0 means the default workspace.
- created_
at string - Secret create date/time.
- description string
- Internal description for your reference.
- metadata any
- Non-secret metadata for the Secret type.
- name string
- Secret name.
- secret_
type string - Secret type.
- updated_
at string - Secret update date/time.
- value_
field_ list(string)names - Names of configured secret value fields. Secret values are never returned.
- workspace_
id number - Workspace ID. 0 means the default workspace.
- created
At String - Secret create date/time.
- description String
- Internal description for your reference.
- metadata Object
- Non-secret metadata for the Secret type.
- name String
- Secret name.
- secret
Type String - Secret type.
- updated
At String - Secret update date/time.
- value
Field List<String>Names - Names of configured secret value fields. Secret values are never returned.
- workspace
Id Integer - Workspace ID. 0 means the default workspace.
- created
At string - Secret create date/time.
- description string
- Internal description for your reference.
- metadata any
- Non-secret metadata for the Secret type.
- name string
- Secret name.
- secret
Type string - Secret type.
- updated
At string - Secret update date/time.
- value
Field string[]Names - Names of configured secret value fields. Secret values are never returned.
- workspace
Id number - Workspace ID. 0 means the default workspace.
- created_
at str - Secret create date/time.
- description str
- Internal description for your reference.
- metadata Any
- Non-secret metadata for the Secret type.
- name str
- Secret name.
- secret_
type str - Secret type.
- updated_
at str - Secret update date/time.
- value_
field_ Sequence[str]names - Names of configured secret value fields. Secret values are never returned.
- workspace_
id int - Workspace ID. 0 means the default workspace.
- created
At String - Secret create date/time.
- description String
- Internal description for your reference.
- metadata Any
- Non-secret metadata for the Secret type.
- name String
- Secret name.
- secret
Type String - Secret type.
- updated
At String - Secret update date/time.
- value
Field List<String>Names - Names of configured secret value fields. Secret values are never returned.
- workspace
Id Number - Workspace ID. 0 means the default workspace.
Import
The pulumi import command can be used, for example:
Secrets can be imported by specifying the id.
$ pulumi import filescom:index/secret:Secret example_secret 1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- filescom jschady/pulumi-filescom
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
filescomTerraform Provider.
published on Thursday, Aug 20, 2026 by jschady