1. Packages
  2. Bitwarden Provider
  3. API Docs
  4. ItemSshKey
bitwarden 0.14.0 published on Tuesday, Jun 17, 2025 by maxlaverse

bitwarden.ItemSshKey

Explore with Pulumi AI

bitwarden logo
bitwarden 0.14.0 published on Tuesday, Jun 17, 2025 by maxlaverse

    Manages an SSH key item.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitwarden from "@pulumi/bitwarden";
    import * as tls from "@pulumi/tls";
    
    const idRsatls_private_key = new tls.index.Tls_private_key("idRsatls_private_key", {
        algorithm: "RSA",
        rsaBits: 4096,
    });
    const idRsaItemSshKey = new bitwarden.ItemSshKey("idRsaItemSshKey", {
        privateKey: idRsatls_private_key.privateKeyPem,
        publicKey: idRsatls_private_key.publicKeyOpenssh,
        keyFingerprint: idRsatls_private_key.publicKeyFingerprintMd5,
    });
    
    import pulumi
    import pulumi_bitwarden as bitwarden
    import pulumi_tls as tls
    
    id_rsatls_private_key = tls.index.Tls_private_key("idRsatls_private_key",
        algorithm=RSA,
        rsa_bits=4096)
    id_rsa_item_ssh_key = bitwarden.ItemSshKey("idRsaItemSshKey",
        private_key=id_rsatls_private_key["privateKeyPem"],
        public_key=id_rsatls_private_key["publicKeyOpenssh"],
        key_fingerprint=id_rsatls_private_key["publicKeyFingerprintMd5"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitwarden/bitwarden"
    	"github.com/pulumi/pulumi-tls/sdk/go/tls"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		idRsatls_private_key, err := tls.NewTls_private_key(ctx, "idRsatls_private_key", &tls.Tls_private_keyArgs{
    			Algorithm: "RSA",
    			RsaBits:   4096,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bitwarden.NewItemSshKey(ctx, "idRsaItemSshKey", &bitwarden.ItemSshKeyArgs{
    			PrivateKey:     idRsatls_private_key.PrivateKeyPem,
    			PublicKey:      idRsatls_private_key.PublicKeyOpenssh,
    			KeyFingerprint: idRsatls_private_key.PublicKeyFingerprintMd5,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitwarden = Pulumi.Bitwarden;
    using Tls = Pulumi.Tls;
    
    return await Deployment.RunAsync(() => 
    {
        var idRsatls_private_key = new Tls.Index.Tls_private_key("idRsatls_private_key", new()
        {
            Algorithm = "RSA",
            RsaBits = 4096,
        });
    
        var idRsaItemSshKey = new Bitwarden.ItemSshKey("idRsaItemSshKey", new()
        {
            PrivateKey = idRsatls_private_key.PrivateKeyPem,
            PublicKey = idRsatls_private_key.PublicKeyOpenssh,
            KeyFingerprint = idRsatls_private_key.PublicKeyFingerprintMd5,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tls.tls_private_key;
    import com.pulumi.tls.Tls_private_keyArgs;
    import com.pulumi.bitwarden.ItemSshKey;
    import com.pulumi.bitwarden.ItemSshKeyArgs;
    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 idRsatls_private_key = new Tls_private_key("idRsatls_private_key", Tls_private_keyArgs.builder()
                .algorithm("RSA")
                .rsaBits(4096)
                .build());
    
            var idRsaItemSshKey = new ItemSshKey("idRsaItemSshKey", ItemSshKeyArgs.builder()
                .privateKey(idRsatls_private_key.privateKeyPem())
                .publicKey(idRsatls_private_key.publicKeyOpenssh())
                .keyFingerprint(idRsatls_private_key.publicKeyFingerprintMd5())
                .build());
    
        }
    }
    
    resources:
      idRsatls_private_key:
        type: tls:tls_private_key
        properties:
          algorithm: RSA
          rsaBits: 4096
      idRsaItemSshKey:
        type: bitwarden:ItemSshKey
        properties:
          privateKey: ${idRsatls_private_key.privateKeyPem}
          publicKey: ${idRsatls_private_key.publicKeyOpenssh}
          keyFingerprint: ${idRsatls_private_key.publicKeyFingerprintMd5}
    

    Create ItemSshKey Resource

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

    Constructor syntax

    new ItemSshKey(name: string, args?: ItemSshKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ItemSshKey(resource_name: str,
                   args: Optional[ItemSshKeyArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ItemSshKey(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   collection_ids: Optional[Sequence[str]] = None,
                   fields: Optional[Sequence[ItemSshKeyFieldArgs]] = None,
                   folder_id: Optional[str] = None,
                   item_ssh_key_id: Optional[str] = None,
                   key_fingerprint: Optional[str] = None,
                   name: Optional[str] = None,
                   notes: Optional[str] = None,
                   organization_id: Optional[str] = None,
                   private_key: Optional[str] = None,
                   public_key: Optional[str] = None,
                   reprompt: Optional[bool] = None)
    func NewItemSshKey(ctx *Context, name string, args *ItemSshKeyArgs, opts ...ResourceOption) (*ItemSshKey, error)
    public ItemSshKey(string name, ItemSshKeyArgs? args = null, CustomResourceOptions? opts = null)
    public ItemSshKey(String name, ItemSshKeyArgs args)
    public ItemSshKey(String name, ItemSshKeyArgs args, CustomResourceOptions options)
    
    type: bitwarden:ItemSshKey
    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 ItemSshKeyArgs
    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 ItemSshKeyArgs
    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 ItemSshKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ItemSshKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ItemSshKeyArgs
    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 itemSshKeyResource = new Bitwarden.ItemSshKey("itemSshKeyResource", new()
    {
        CollectionIds = new[]
        {
            "string",
        },
        Fields = new[]
        {
            new Bitwarden.Inputs.ItemSshKeyFieldArgs
            {
                Name = "string",
                Boolean = false,
                Hidden = "string",
                Linked = "string",
                Text = "string",
            },
        },
        FolderId = "string",
        ItemSshKeyId = "string",
        KeyFingerprint = "string",
        Name = "string",
        Notes = "string",
        OrganizationId = "string",
        PrivateKey = "string",
        PublicKey = "string",
        Reprompt = false,
    });
    
    example, err := bitwarden.NewItemSshKey(ctx, "itemSshKeyResource", &bitwarden.ItemSshKeyArgs{
    	CollectionIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Fields: bitwarden.ItemSshKeyFieldArray{
    		&bitwarden.ItemSshKeyFieldArgs{
    			Name:    pulumi.String("string"),
    			Boolean: pulumi.Bool(false),
    			Hidden:  pulumi.String("string"),
    			Linked:  pulumi.String("string"),
    			Text:    pulumi.String("string"),
    		},
    	},
    	FolderId:       pulumi.String("string"),
    	ItemSshKeyId:   pulumi.String("string"),
    	KeyFingerprint: pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	Notes:          pulumi.String("string"),
    	OrganizationId: pulumi.String("string"),
    	PrivateKey:     pulumi.String("string"),
    	PublicKey:      pulumi.String("string"),
    	Reprompt:       pulumi.Bool(false),
    })
    
    var itemSshKeyResource = new ItemSshKey("itemSshKeyResource", ItemSshKeyArgs.builder()
        .collectionIds("string")
        .fields(ItemSshKeyFieldArgs.builder()
            .name("string")
            .boolean_(false)
            .hidden("string")
            .linked("string")
            .text("string")
            .build())
        .folderId("string")
        .itemSshKeyId("string")
        .keyFingerprint("string")
        .name("string")
        .notes("string")
        .organizationId("string")
        .privateKey("string")
        .publicKey("string")
        .reprompt(false)
        .build());
    
    item_ssh_key_resource = bitwarden.ItemSshKey("itemSshKeyResource",
        collection_ids=["string"],
        fields=[{
            "name": "string",
            "boolean": False,
            "hidden": "string",
            "linked": "string",
            "text": "string",
        }],
        folder_id="string",
        item_ssh_key_id="string",
        key_fingerprint="string",
        name="string",
        notes="string",
        organization_id="string",
        private_key="string",
        public_key="string",
        reprompt=False)
    
    const itemSshKeyResource = new bitwarden.ItemSshKey("itemSshKeyResource", {
        collectionIds: ["string"],
        fields: [{
            name: "string",
            boolean: false,
            hidden: "string",
            linked: "string",
            text: "string",
        }],
        folderId: "string",
        itemSshKeyId: "string",
        keyFingerprint: "string",
        name: "string",
        notes: "string",
        organizationId: "string",
        privateKey: "string",
        publicKey: "string",
        reprompt: false,
    });
    
    type: bitwarden:ItemSshKey
    properties:
        collectionIds:
            - string
        fields:
            - boolean: false
              hidden: string
              linked: string
              name: string
              text: string
        folderId: string
        itemSshKeyId: string
        keyFingerprint: string
        name: string
        notes: string
        organizationId: string
        privateKey: string
        publicKey: string
        reprompt: false
    

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

    CollectionIds List<string>
    Identifier of the collections the item belongs to.
    Fields List<ItemSshKeyField>
    Extra fields.
    FolderId string
    Identifier of the folder.
    ItemSshKeyId string
    Identifier.
    KeyFingerprint string
    Key fingerprint.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    PrivateKey string
    Private key.
    PublicKey string
    Public key.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    CollectionIds []string
    Identifier of the collections the item belongs to.
    Fields []ItemSshKeyFieldArgs
    Extra fields.
    FolderId string
    Identifier of the folder.
    ItemSshKeyId string
    Identifier.
    KeyFingerprint string
    Key fingerprint.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    PrivateKey string
    Private key.
    PublicKey string
    Public key.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    collectionIds List<String>
    Identifier of the collections the item belongs to.
    fields List<ItemSshKeyField>
    Extra fields.
    folderId String
    Identifier of the folder.
    itemSshKeyId String
    Identifier.
    keyFingerprint String
    Key fingerprint.
    name String
    Name.
    notes String
    Notes.
    organizationId String
    Identifier of the organization.
    privateKey String
    Private key.
    publicKey String
    Public key.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.
    collectionIds string[]
    Identifier of the collections the item belongs to.
    fields ItemSshKeyField[]
    Extra fields.
    folderId string
    Identifier of the folder.
    itemSshKeyId string
    Identifier.
    keyFingerprint string
    Key fingerprint.
    name string
    Name.
    notes string
    Notes.
    organizationId string
    Identifier of the organization.
    privateKey string
    Private key.
    publicKey string
    Public key.
    reprompt boolean
    Require master password 're-prompt' when displaying secret in the UI.
    collection_ids Sequence[str]
    Identifier of the collections the item belongs to.
    fields Sequence[ItemSshKeyFieldArgs]
    Extra fields.
    folder_id str
    Identifier of the folder.
    item_ssh_key_id str
    Identifier.
    key_fingerprint str
    Key fingerprint.
    name str
    Name.
    notes str
    Notes.
    organization_id str
    Identifier of the organization.
    private_key str
    Private key.
    public_key str
    Public key.
    reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    collectionIds List<String>
    Identifier of the collections the item belongs to.
    fields List<Property Map>
    Extra fields.
    folderId String
    Identifier of the folder.
    itemSshKeyId String
    Identifier.
    keyFingerprint String
    Key fingerprint.
    name String
    Name.
    notes String
    Notes.
    organizationId String
    Identifier of the organization.
    privateKey String
    Private key.
    publicKey String
    Public key.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.

    Outputs

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

    CreationDate string
    Date the item was created.
    DeletedDate string
    Date the item was deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    RevisionDate string
    Last time the item was updated.
    CreationDate string
    Date the item was created.
    DeletedDate string
    Date the item was deleted.
    Id string
    The provider-assigned unique ID for this managed resource.
    RevisionDate string
    Last time the item was updated.
    creationDate String
    Date the item was created.
    deletedDate String
    Date the item was deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    revisionDate String
    Last time the item was updated.
    creationDate string
    Date the item was created.
    deletedDate string
    Date the item was deleted.
    id string
    The provider-assigned unique ID for this managed resource.
    revisionDate string
    Last time the item was updated.
    creation_date str
    Date the item was created.
    deleted_date str
    Date the item was deleted.
    id str
    The provider-assigned unique ID for this managed resource.
    revision_date str
    Last time the item was updated.
    creationDate String
    Date the item was created.
    deletedDate String
    Date the item was deleted.
    id String
    The provider-assigned unique ID for this managed resource.
    revisionDate String
    Last time the item was updated.

    Look up Existing ItemSshKey Resource

    Get an existing ItemSshKey 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?: ItemSshKeyState, opts?: CustomResourceOptions): ItemSshKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            collection_ids: Optional[Sequence[str]] = None,
            creation_date: Optional[str] = None,
            deleted_date: Optional[str] = None,
            fields: Optional[Sequence[ItemSshKeyFieldArgs]] = None,
            folder_id: Optional[str] = None,
            item_ssh_key_id: Optional[str] = None,
            key_fingerprint: Optional[str] = None,
            name: Optional[str] = None,
            notes: Optional[str] = None,
            organization_id: Optional[str] = None,
            private_key: Optional[str] = None,
            public_key: Optional[str] = None,
            reprompt: Optional[bool] = None,
            revision_date: Optional[str] = None) -> ItemSshKey
    func GetItemSshKey(ctx *Context, name string, id IDInput, state *ItemSshKeyState, opts ...ResourceOption) (*ItemSshKey, error)
    public static ItemSshKey Get(string name, Input<string> id, ItemSshKeyState? state, CustomResourceOptions? opts = null)
    public static ItemSshKey get(String name, Output<String> id, ItemSshKeyState state, CustomResourceOptions options)
    resources:  _:    type: bitwarden:ItemSshKey    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.
    The following state arguments are supported:
    CollectionIds List<string>
    Identifier of the collections the item belongs to.
    CreationDate string
    Date the item was created.
    DeletedDate string
    Date the item was deleted.
    Fields List<ItemSshKeyField>
    Extra fields.
    FolderId string
    Identifier of the folder.
    ItemSshKeyId string
    Identifier.
    KeyFingerprint string
    Key fingerprint.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    PrivateKey string
    Private key.
    PublicKey string
    Public key.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    RevisionDate string
    Last time the item was updated.
    CollectionIds []string
    Identifier of the collections the item belongs to.
    CreationDate string
    Date the item was created.
    DeletedDate string
    Date the item was deleted.
    Fields []ItemSshKeyFieldArgs
    Extra fields.
    FolderId string
    Identifier of the folder.
    ItemSshKeyId string
    Identifier.
    KeyFingerprint string
    Key fingerprint.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    PrivateKey string
    Private key.
    PublicKey string
    Public key.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    RevisionDate string
    Last time the item was updated.
    collectionIds List<String>
    Identifier of the collections the item belongs to.
    creationDate String
    Date the item was created.
    deletedDate String
    Date the item was deleted.
    fields List<ItemSshKeyField>
    Extra fields.
    folderId String
    Identifier of the folder.
    itemSshKeyId String
    Identifier.
    keyFingerprint String
    Key fingerprint.
    name String
    Name.
    notes String
    Notes.
    organizationId String
    Identifier of the organization.
    privateKey String
    Private key.
    publicKey String
    Public key.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate String
    Last time the item was updated.
    collectionIds string[]
    Identifier of the collections the item belongs to.
    creationDate string
    Date the item was created.
    deletedDate string
    Date the item was deleted.
    fields ItemSshKeyField[]
    Extra fields.
    folderId string
    Identifier of the folder.
    itemSshKeyId string
    Identifier.
    keyFingerprint string
    Key fingerprint.
    name string
    Name.
    notes string
    Notes.
    organizationId string
    Identifier of the organization.
    privateKey string
    Private key.
    publicKey string
    Public key.
    reprompt boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate string
    Last time the item was updated.
    collection_ids Sequence[str]
    Identifier of the collections the item belongs to.
    creation_date str
    Date the item was created.
    deleted_date str
    Date the item was deleted.
    fields Sequence[ItemSshKeyFieldArgs]
    Extra fields.
    folder_id str
    Identifier of the folder.
    item_ssh_key_id str
    Identifier.
    key_fingerprint str
    Key fingerprint.
    name str
    Name.
    notes str
    Notes.
    organization_id str
    Identifier of the organization.
    private_key str
    Private key.
    public_key str
    Public key.
    reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    revision_date str
    Last time the item was updated.
    collectionIds List<String>
    Identifier of the collections the item belongs to.
    creationDate String
    Date the item was created.
    deletedDate String
    Date the item was deleted.
    fields List<Property Map>
    Extra fields.
    folderId String
    Identifier of the folder.
    itemSshKeyId String
    Identifier.
    keyFingerprint String
    Key fingerprint.
    name String
    Name.
    notes String
    Notes.
    organizationId String
    Identifier of the organization.
    privateKey String
    Private key.
    publicKey String
    Public key.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate String
    Last time the item was updated.

    Supporting Types

    ItemSshKeyField, ItemSshKeyFieldArgs

    Name string
    Name of the field.
    Boolean bool
    Value of a boolean field.
    Hidden string
    Value of a hidden text field.
    Linked string
    Value of a linked field.
    Text string
    Value of a text field.
    Name string
    Name of the field.
    Boolean bool
    Value of a boolean field.
    Hidden string
    Value of a hidden text field.
    Linked string
    Value of a linked field.
    Text string
    Value of a text field.
    name String
    Name of the field.
    boolean_ Boolean
    Value of a boolean field.
    hidden String
    Value of a hidden text field.
    linked String
    Value of a linked field.
    text String
    Value of a text field.
    name string
    Name of the field.
    boolean boolean
    Value of a boolean field.
    hidden string
    Value of a hidden text field.
    linked string
    Value of a linked field.
    text string
    Value of a text field.
    name str
    Name of the field.
    boolean bool
    Value of a boolean field.
    hidden str
    Value of a hidden text field.
    linked str
    Value of a linked field.
    text str
    Value of a text field.
    name String
    Name of the field.
    boolean Boolean
    Value of a boolean field.
    hidden String
    Value of a hidden text field.
    linked String
    Value of a linked field.
    text String
    Value of a text field.

    Import

    $ pulumi import bitwarden:index/itemSshKey:ItemSshKey example <login_item_id>
    

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

    Package Details

    Repository
    bitwarden maxlaverse/terraform-provider-bitwarden
    License
    Notes
    This Pulumi package is based on the bitwarden Terraform Provider.
    bitwarden logo
    bitwarden 0.14.0 published on Tuesday, Jun 17, 2025 by maxlaverse