1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. SecretText
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.SecretText

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating secret of type secret text

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var inline = new Harness.Platform.SecretText("inline", new()
        {
            Description = "example",
            Identifier = "identifier",
            SecretManagerIdentifier = "harnessSecretManager",
            Tags = new[]
            {
                "foo:bar",
            },
            Value = "secret",
            ValueType = "Inline",
        });
    
        var reference = new Harness.Platform.SecretText("reference", new()
        {
            Description = "example",
            Identifier = "identifier",
            SecretManagerIdentifier = "azureSecretManager",
            Tags = new[]
            {
                "foo:bar",
            },
            Value = "secret",
            ValueType = "Reference",
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/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.NewSecretText(ctx, "inline", &platform.SecretTextArgs{
    			Description:             pulumi.String("example"),
    			Identifier:              pulumi.String("identifier"),
    			SecretManagerIdentifier: pulumi.String("harnessSecretManager"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    			},
    			Value:     pulumi.String("secret"),
    			ValueType: pulumi.String("Inline"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewSecretText(ctx, "reference", &platform.SecretTextArgs{
    			Description:             pulumi.String("example"),
    			Identifier:              pulumi.String("identifier"),
    			SecretManagerIdentifier: pulumi.String("azureSecretManager"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    			},
    			Value:     pulumi.String("secret"),
    			ValueType: pulumi.String("Reference"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.SecretText;
    import com.pulumi.harness.platform.SecretTextArgs;
    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 inline = new SecretText("inline", SecretTextArgs.builder()        
                .description("example")
                .identifier("identifier")
                .secretManagerIdentifier("harnessSecretManager")
                .tags("foo:bar")
                .value("secret")
                .valueType("Inline")
                .build());
    
            var reference = new SecretText("reference", SecretTextArgs.builder()        
                .description("example")
                .identifier("identifier")
                .secretManagerIdentifier("azureSecretManager")
                .tags("foo:bar")
                .value("secret")
                .valueType("Reference")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    inline = harness.platform.SecretText("inline",
        description="example",
        identifier="identifier",
        secret_manager_identifier="harnessSecretManager",
        tags=["foo:bar"],
        value="secret",
        value_type="Inline")
    reference = harness.platform.SecretText("reference",
        description="example",
        identifier="identifier",
        secret_manager_identifier="azureSecretManager",
        tags=["foo:bar"],
        value="secret",
        value_type="Reference")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    const inline = new harness.platform.SecretText("inline", {
        description: "example",
        identifier: "identifier",
        secretManagerIdentifier: "harnessSecretManager",
        tags: ["foo:bar"],
        value: "secret",
        valueType: "Inline",
    });
    const reference = new harness.platform.SecretText("reference", {
        description: "example",
        identifier: "identifier",
        secretManagerIdentifier: "azureSecretManager",
        tags: ["foo:bar"],
        value: "secret",
        valueType: "Reference",
    });
    
    resources:
      inline:
        type: harness:platform:SecretText
        properties:
          description: example
          identifier: identifier
          secretManagerIdentifier: harnessSecretManager
          tags:
            - foo:bar
          value: secret
          valueType: Inline
      reference:
        type: harness:platform:SecretText
        properties:
          description: example
          identifier: identifier
          secretManagerIdentifier: azureSecretManager
          tags:
            - foo:bar
          value: secret
          valueType: Reference
    

    Create SecretText Resource

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

    Constructor syntax

    new SecretText(name: string, args: SecretTextArgs, opts?: CustomResourceOptions);
    @overload
    def SecretText(resource_name: str,
                   args: SecretTextArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecretText(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   identifier: Optional[str] = None,
                   secret_manager_identifier: Optional[str] = None,
                   value: Optional[str] = None,
                   value_type: 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 NewSecretText(ctx *Context, name string, args SecretTextArgs, opts ...ResourceOption) (*SecretText, error)
    public SecretText(string name, SecretTextArgs args, CustomResourceOptions? opts = null)
    public SecretText(String name, SecretTextArgs args)
    public SecretText(String name, SecretTextArgs args, CustomResourceOptions options)
    
    type: harness:platform:SecretText
    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 SecretTextArgs
    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 SecretTextArgs
    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 SecretTextArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretTextArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretTextArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var secretTextResource = new Harness.Platform.SecretText("secretTextResource", new()
    {
        Identifier = "string",
        SecretManagerIdentifier = "string",
        Value = "string",
        ValueType = "string",
        Description = "string",
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewSecretText(ctx, "secretTextResource", &platform.SecretTextArgs{
    	Identifier:              pulumi.String("string"),
    	SecretManagerIdentifier: pulumi.String("string"),
    	Value:                   pulumi.String("string"),
    	ValueType:               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 secretTextResource = new SecretText("secretTextResource", SecretTextArgs.builder()        
        .identifier("string")
        .secretManagerIdentifier("string")
        .value("string")
        .valueType("string")
        .description("string")
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .build());
    
    secret_text_resource = harness.platform.SecretText("secretTextResource",
        identifier="string",
        secret_manager_identifier="string",
        value="string",
        value_type="string",
        description="string",
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"])
    
    const secretTextResource = new harness.platform.SecretText("secretTextResource", {
        identifier: "string",
        secretManagerIdentifier: "string",
        value: "string",
        valueType: "string",
        description: "string",
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
    });
    
    type: harness:platform:SecretText
    properties:
        description: string
        identifier: string
        name: string
        orgId: string
        projectId: string
        secretManagerIdentifier: string
        tags:
            - string
        value: string
        valueType: string
    

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

    Identifier string
    Unique identifier of the resource.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Value string
    Value of the Secret
    ValueType string
    This has details to specify if the secret value is Inline or Reference.
    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.
    Identifier string
    Unique identifier of the resource.
    SecretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    Value string
    Value of the Secret
    ValueType string
    This has details to specify if the secret value is Inline or Reference.
    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.
    identifier String
    Unique identifier of the resource.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    value String
    Value of the Secret
    valueType String
    This has details to specify if the secret value is Inline or Reference.
    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.
    identifier string
    Unique identifier of the resource.
    secretManagerIdentifier string
    Identifier of the Secret Manager used to manage the secret.
    value string
    Value of the Secret
    valueType string
    This has details to specify if the secret value is Inline or Reference.
    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.
    identifier str
    Unique identifier of the resource.
    secret_manager_identifier str
    Identifier of the Secret Manager used to manage the secret.
    value str
    Value of the Secret
    value_type str
    This has details to specify if the secret value is Inline or Reference.
    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.
    identifier String
    Unique identifier of the resource.
    secretManagerIdentifier String
    Identifier of the Secret Manager used to manage the secret.
    value String
    Value of the Secret
    valueType String
    This has details to specify if the secret value is Inline or Reference.
    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 SecretText 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 SecretText Resource

    Get an existing SecretText 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?: SecretTextState, opts?: CustomResourceOptions): SecretText
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: 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,
            value: Optional[str] = None,
            value_type: Optional[str] = None) -> SecretText
    func GetSecretText(ctx *Context, name string, id IDInput, state *SecretTextState, opts ...ResourceOption) (*SecretText, error)
    public static SecretText Get(string name, Input<string> id, SecretTextState? state, CustomResourceOptions? opts = null)
    public static SecretText get(String name, Output<String> id, SecretTextState 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.
    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.
    Value string
    Value of the Secret
    ValueType string
    This has details to specify if the secret value is Inline or Reference.
    Description string
    Description of the resource.
    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.
    Value string
    Value of the Secret
    ValueType string
    This has details to specify if the secret value is Inline or Reference.
    description String
    Description of the resource.
    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.
    value String
    Value of the Secret
    valueType String
    This has details to specify if the secret value is Inline or Reference.
    description string
    Description of the resource.
    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.
    value string
    Value of the Secret
    valueType string
    This has details to specify if the secret value is Inline or Reference.
    description str
    Description of the resource.
    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.
    value str
    Value of the Secret
    value_type str
    This has details to specify if the secret value is Inline or Reference.
    description String
    Description of the resource.
    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.
    value String
    Value of the Secret
    valueType String
    This has details to specify if the secret value is Inline or Reference.

    Import

    Import account level secret text

     $ pulumi import harness:platform/secretText:SecretText example <secret_text_id>
    

    Import org level secret text

     $ pulumi import harness:platform/secretText:SecretText example <ord_id>/<secret_text_id>
    

    Import project level secret text

     $ pulumi import harness:platform/secretText:SecretText example <org_id>/<project_id>/<secret_text_id>
    

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

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs