1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. SecretFile
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

harness.platform.SecretFile

Explore with Pulumi AI

harness logo
Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const example = new harness.platform.SecretFile("example", {
        identifier: "identifier",
        name: "name",
        description: "test",
        tags: ["foo:bar"],
        filePath: "file_path",
        secretManagerIdentifier: "harnessSecretManager",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    example = harness.platform.SecretFile("example",
        identifier="identifier",
        name="name",
        description="test",
        tags=["foo:bar"],
        file_path="file_path",
        secret_manager_identifier="harnessSecretManager")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewSecretFile(ctx, "example", &platform.SecretFileArgs{
    			Identifier:  pulumi.String("identifier"),
    			Name:        pulumi.String("name"),
    			Description: pulumi.String("test"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    			},
    			FilePath:                pulumi.String("file_path"),
    			SecretManagerIdentifier: pulumi.String("harnessSecretManager"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Harness.Platform.SecretFile("example", new()
        {
            Identifier = "identifier",
            Name = "name",
            Description = "test",
            Tags = new[]
            {
                "foo:bar",
            },
            FilePath = "file_path",
            SecretManagerIdentifier = "harnessSecretManager",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.SecretFile;
    import com.pulumi.harness.platform.SecretFileArgs;
    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 example = new SecretFile("example", SecretFileArgs.builder()
                .identifier("identifier")
                .name("name")
                .description("test")
                .tags("foo:bar")
                .filePath("file_path")
                .secretManagerIdentifier("harnessSecretManager")
                .build());
    
        }
    }
    
    resources:
      example:
        type: harness:platform:SecretFile
        properties:
          identifier: identifier
          name: name
          description: test
          tags:
            - foo:bar
          filePath: file_path
          secretManagerIdentifier: harnessSecretManager
    

    Create SecretFile Resource

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

    Constructor syntax

    new SecretFile(name: string, args: SecretFileArgs, opts?: CustomResourceOptions);
    @overload
    def SecretFile(resource_name: str,
                   args: SecretFileArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretFile(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   file_path: Optional[str] = None,
                   identifier: Optional[str] = None,
                   secret_manager_identifier: Optional[str] = None,
                   description: Optional[str] = None,
                   name: Optional[str] = None,
                   org_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None)
    func NewSecretFile(ctx *Context, name string, args SecretFileArgs, opts ...ResourceOption) (*SecretFile, error)
    public SecretFile(string name, SecretFileArgs args, CustomResourceOptions? opts = null)
    public SecretFile(String name, SecretFileArgs args)
    public SecretFile(String name, SecretFileArgs args, CustomResourceOptions options)
    
    type: harness:platform:SecretFile
    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 SecretFileArgs
    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 SecretFileArgs
    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 SecretFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretFileArgs
    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 secretFileResource = new Harness.Platform.SecretFile("secretFileResource", new()
    {
        FilePath = "string",
        Identifier = "string",
        SecretManagerIdentifier = "string",
        Description = "string",
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewSecretFile(ctx, "secretFileResource", &platform.SecretFileArgs{
    	FilePath:                pulumi.String("string"),
    	Identifier:              pulumi.String("string"),
    	SecretManagerIdentifier: pulumi.String("string"),
    	Description:             pulumi.String("string"),
    	Name:                    pulumi.String("string"),
    	OrgId:                   pulumi.String("string"),
    	ProjectId:               pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var secretFileResource = new SecretFile("secretFileResource", SecretFileArgs.builder()
        .filePath("string")
        .identifier("string")
        .secretManagerIdentifier("string")
        .description("string")
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .build());
    
    secret_file_resource = harness.platform.SecretFile("secretFileResource",
        file_path="string",
        identifier="string",
        secret_manager_identifier="string",
        description="string",
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"])
    
    const secretFileResource = new harness.platform.SecretFile("secretFileResource", {
        filePath: "string",
        identifier: "string",
        secretManagerIdentifier: "string",
        description: "string",
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
    });
    
    type: harness:platform:SecretFile
    properties:
        description: string
        filePath: string
        identifier: string
        name: string
        orgId: string
        projectId: string
        secretManagerIdentifier: string
        tags:
            - string
    

    SecretFile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecretFile resource accepts the following input properties:

    FilePath string
    Path of the file containing secret value
    Identifier string
    Unique identifier of the resource.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    FilePath string
    Path of the file containing secret value
    Identifier string
    Unique identifier of the resource.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Description string
    Description of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    filePath String
    Path of the file containing secret value
    identifier String
    Unique identifier of the resource.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    description String
    Description of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    filePath string
    Path of the file containing secret value
    identifier string
    Unique identifier of the resource.
    secretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    description string
    Description of the resource.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    tags string[]
    Tags to associate with the resource.
    file_path str
    Path of the file containing secret value
    identifier str
    Unique identifier of the resource.
    secret_manager_identifier str
    Identifier of the Secret Manager used to manage the secret.
    description str
    Description of the resource.
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    tags Sequence[str]
    Tags to associate with the resource.
    filePath String
    Path of the file containing secret value
    identifier String
    Unique identifier of the resource.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    description String
    Description of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecretFile 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 SecretFile Resource

    Get an existing SecretFile 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?: SecretFileState, opts?: CustomResourceOptions): SecretFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            file_path: Optional[str] = None,
            identifier: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            secret_manager_identifier: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> SecretFile
    func GetSecretFile(ctx *Context, name string, id IDInput, state *SecretFileState, opts ...ResourceOption) (*SecretFile, error)
    public static SecretFile Get(string name, Input<string> id, SecretFileState? state, CustomResourceOptions? opts = null)
    public static SecretFile get(String name, Output<String> id, SecretFileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    Description of the resource.
    FilePath string
    Path of the file containing secret value
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Tags List<string>
    Tags to associate with the resource.
    Description string
    Description of the resource.
    FilePath string
    Path of the file containing secret value
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Tags []string
    Tags to associate with the resource.
    description String
    Description of the resource.
    filePath String
    Path of the file containing secret value
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    tags List<String>
    Tags to associate with the resource.
    description string
    Description of the resource.
    filePath string
    Path of the file containing secret value
    identifier string
    Unique identifier of the resource.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    secretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    tags string[]
    Tags to associate with the resource.
    description str
    Description of the resource.
    file_path str
    Path of the file containing secret value
    identifier str
    Unique identifier of the resource.
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    secret_manager_identifier str
    Identifier of the Secret Manager used to manage the secret.
    tags Sequence[str]
    Tags to associate with the resource.
    description String
    Description of the resource.
    filePath String
    Path of the file containing secret value
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    tags List<String>
    Tags to associate with the resource.

    Import

    Import account level secret file

    $ pulumi import harness:platform/secretFile:SecretFile example <secret_file_id>
    

    Import org level secret file

    $ pulumi import harness:platform/secretFile:SecretFile example <ord_id>/<secret_file_id>
    

    Import project level secret file

    $ pulumi import harness:platform/secretFile:SecretFile example <org_id>/<project_id>/<secret_file_id>
    

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.1.1 published on Friday, Jul 12, 2024 by Pulumi