bitwarden.ItemSshKey
Explore with Pulumi AI
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:
- Collection
Ids List<string> - Identifier of the collections the item belongs to.
- Fields
List<Item
Ssh Key Field> - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Ssh stringKey Id - Identifier.
- Key
Fingerprint string - Key fingerprint.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Private
Key string - Private key.
- Public
Key string - Public key.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Collection
Ids []string - Identifier of the collections the item belongs to.
- Fields
[]Item
Ssh Key Field Args - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Ssh stringKey Id - Identifier.
- Key
Fingerprint string - Key fingerprint.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Private
Key string - Private key.
- Public
Key string - Public key.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- fields
List<Item
Ssh Key Field> - Extra fields.
- folder
Id String - Identifier of the folder.
- item
Ssh StringKey Id - Identifier.
- key
Fingerprint String - Key fingerprint.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- private
Key String - Private key.
- public
Key String - Public key.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- collection
Ids string[] - Identifier of the collections the item belongs to.
- fields
Item
Ssh Key Field[] - Extra fields.
- folder
Id string - Identifier of the folder.
- item
Ssh stringKey Id - Identifier.
- key
Fingerprint string - Key fingerprint.
- name string
- Name.
- notes string
- Notes.
- organization
Id string - Identifier of the organization.
- private
Key string - Private key.
- public
Key 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[Item
Ssh Key Field Args] - Extra fields.
- folder_
id str - Identifier of the folder.
- item_
ssh_ strkey_ id - 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.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- fields List<Property Map>
- Extra fields.
- folder
Id String - Identifier of the folder.
- item
Ssh StringKey Id - Identifier.
- key
Fingerprint String - Key fingerprint.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- private
Key String - Private key.
- public
Key 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:
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Date string - Last time the item was updated.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Date string - Last time the item was updated.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Date String - Last time the item was updated.
- creation
Date string - Date the item was created.
- deleted
Date string - Date the item was deleted.
- id string
- The provider-assigned unique ID for this managed resource.
- revision
Date 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.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Date 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.
- Collection
Ids List<string> - Identifier of the collections the item belongs to.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Fields
List<Item
Ssh Key Field> - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Ssh stringKey Id - Identifier.
- Key
Fingerprint string - Key fingerprint.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Private
Key string - Private key.
- Public
Key string - Public key.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Revision
Date string - Last time the item was updated.
- Collection
Ids []string - Identifier of the collections the item belongs to.
- Creation
Date string - Date the item was created.
- Deleted
Date string - Date the item was deleted.
- Fields
[]Item
Ssh Key Field Args - Extra fields.
- Folder
Id string - Identifier of the folder.
- Item
Ssh stringKey Id - Identifier.
- Key
Fingerprint string - Key fingerprint.
- Name string
- Name.
- Notes string
- Notes.
- Organization
Id string - Identifier of the organization.
- Private
Key string - Private key.
- Public
Key string - Public key.
- Reprompt bool
- Require master password 're-prompt' when displaying secret in the UI.
- Revision
Date string - Last time the item was updated.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- fields
List<Item
Ssh Key Field> - Extra fields.
- folder
Id String - Identifier of the folder.
- item
Ssh StringKey Id - Identifier.
- key
Fingerprint String - Key fingerprint.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- private
Key String - Private key.
- public
Key String - Public key.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date String - Last time the item was updated.
- collection
Ids string[] - Identifier of the collections the item belongs to.
- creation
Date string - Date the item was created.
- deleted
Date string - Date the item was deleted.
- fields
Item
Ssh Key Field[] - Extra fields.
- folder
Id string - Identifier of the folder.
- item
Ssh stringKey Id - Identifier.
- key
Fingerprint string - Key fingerprint.
- name string
- Name.
- notes string
- Notes.
- organization
Id string - Identifier of the organization.
- private
Key string - Private key.
- public
Key string - Public key.
- reprompt boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date 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[Item
Ssh Key Field Args] - Extra fields.
- folder_
id str - Identifier of the folder.
- item_
ssh_ strkey_ id - 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.
- collection
Ids List<String> - Identifier of the collections the item belongs to.
- creation
Date String - Date the item was created.
- deleted
Date String - Date the item was deleted.
- fields List<Property Map>
- Extra fields.
- folder
Id String - Identifier of the folder.
- item
Ssh StringKey Id - Identifier.
- key
Fingerprint String - Key fingerprint.
- name String
- Name.
- notes String
- Notes.
- organization
Id String - Identifier of the organization.
- private
Key String - Private key.
- public
Key String - Public key.
- reprompt Boolean
- Require master password 're-prompt' when displaying secret in the UI.
- revision
Date String - Last time the item was updated.
Supporting Types
ItemSshKeyField, ItemSshKeyFieldArgs
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.