1. Packages
  2. Bitwarden Provider
  3. API Docs
  4. getItemSecureNote
bitwarden 0.13.6 published on Thursday, Apr 17, 2025 by maxlaverse

bitwarden.getItemSecureNote

Explore with Pulumi AI

Use this data source to get information on an existing secure note item.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as bitwarden from "@pulumi/bitwarden";
import * as kubernetes from "@pulumi/kubernetes";

const vpnPresharedKey = bitwarden.getItemSecureNote({
    search: "VPN/Pre-sharedSecret",
});
// Example of usage of the data source:
const presharedKey = new kubernetes.index.Kubernetes_secret("presharedKey", {
    metadata: [{
        name: "vpn-preshared-key",
    }],
    data: {
        "private.key": vpnPresharedKey.notes,
    },
});
Copy
import pulumi
import pulumi_bitwarden as bitwarden
import pulumi_kubernetes as kubernetes

vpn_preshared_key = bitwarden.get_item_secure_note(search="VPN/Pre-sharedSecret")
# Example of usage of the data source:
preshared_key = kubernetes.index.Kubernetes_secret("presharedKey",
    metadata=[{
        name: vpn-preshared-key,
    }],
    data={
        private.key: vpn_preshared_key.notes,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes"
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitwarden/bitwarden"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		vpnPresharedKey, err := bitwarden.LookupItemSecureNote(ctx, &bitwarden.LookupItemSecureNoteArgs{
			Search: pulumi.StringRef("VPN/Pre-sharedSecret"),
		}, nil)
		if err != nil {
			return err
		}
		// Example of usage of the data source:
		_, err = kubernetes.NewKubernetes_secret(ctx, "presharedKey", &kubernetes.Kubernetes_secretArgs{
			Metadata: []map[string]interface{}{
				map[string]interface{}{
					"name": "vpn-preshared-key",
				},
			},
			Data: map[string]interface{}{
				"private.key": vpnPresharedKey.Notes,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bitwarden = Pulumi.Bitwarden;
using Kubernetes = Pulumi.Kubernetes;

return await Deployment.RunAsync(() => 
{
    var vpnPresharedKey = Bitwarden.GetItemSecureNote.Invoke(new()
    {
        Search = "VPN/Pre-sharedSecret",
    });

    // Example of usage of the data source:
    var presharedKey = new Kubernetes.Index.Kubernetes_secret("presharedKey", new()
    {
        Metadata = new[]
        {
            
            {
                { "name", "vpn-preshared-key" },
            },
        },
        Data = 
        {
            { "private.key", vpnPresharedKey.Apply(getItemSecureNoteResult => getItemSecureNoteResult.Notes) },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitwarden.BitwardenFunctions;
import com.pulumi.bitwarden.inputs.GetItemSecureNoteArgs;
import com.pulumi.kubernetes.kubernetes_secret;
import com.pulumi.kubernetes.Kubernetes_secretArgs;
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) {
        final var vpnPresharedKey = BitwardenFunctions.getItemSecureNote(GetItemSecureNoteArgs.builder()
            .search("VPN/Pre-sharedSecret")
            .build());

        // Example of usage of the data source:
        var presharedKey = new Kubernetes_secret("presharedKey", Kubernetes_secretArgs.builder()
            .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .data(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .build());

    }
}
Copy
resources:
  # Example of usage of the data source:
  presharedKey:
    type: kubernetes:kubernetes_secret
    properties:
      metadata:
        - name: vpn-preshared-key
      data:
        private.key: ${vpnPresharedKey.notes}
variables:
  vpnPresharedKey:
    fn::invoke:
      function: bitwarden:getItemSecureNote
      arguments:
        search: VPN/Pre-sharedSecret
Copy

Using getItemSecureNote

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getItemSecureNote(args: GetItemSecureNoteArgs, opts?: InvokeOptions): Promise<GetItemSecureNoteResult>
function getItemSecureNoteOutput(args: GetItemSecureNoteOutputArgs, opts?: InvokeOptions): Output<GetItemSecureNoteResult>
Copy
def get_item_secure_note(filter_collection_id: Optional[str] = None,
                         filter_folder_id: Optional[str] = None,
                         filter_organization_id: Optional[str] = None,
                         id: Optional[str] = None,
                         search: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetItemSecureNoteResult
def get_item_secure_note_output(filter_collection_id: Optional[pulumi.Input[str]] = None,
                         filter_folder_id: Optional[pulumi.Input[str]] = None,
                         filter_organization_id: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         search: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetItemSecureNoteResult]
Copy
func LookupItemSecureNote(ctx *Context, args *LookupItemSecureNoteArgs, opts ...InvokeOption) (*LookupItemSecureNoteResult, error)
func LookupItemSecureNoteOutput(ctx *Context, args *LookupItemSecureNoteOutputArgs, opts ...InvokeOption) LookupItemSecureNoteResultOutput
Copy

> Note: This function is named LookupItemSecureNote in the Go SDK.

public static class GetItemSecureNote 
{
    public static Task<GetItemSecureNoteResult> InvokeAsync(GetItemSecureNoteArgs args, InvokeOptions? opts = null)
    public static Output<GetItemSecureNoteResult> Invoke(GetItemSecureNoteInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetItemSecureNoteResult> getItemSecureNote(GetItemSecureNoteArgs args, InvokeOptions options)
public static Output<GetItemSecureNoteResult> getItemSecureNote(GetItemSecureNoteArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: bitwarden:index/getItemSecureNote:getItemSecureNote
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

FilterCollectionId string
Filter search results by collection ID.
FilterFolderId string
Filter search results by folder ID.
FilterOrganizationId string
Filter search results by organization ID.
Id string
Identifier.
Search string
Search items matching the search string.
FilterCollectionId string
Filter search results by collection ID.
FilterFolderId string
Filter search results by folder ID.
FilterOrganizationId string
Filter search results by organization ID.
Id string
Identifier.
Search string
Search items matching the search string.
filterCollectionId String
Filter search results by collection ID.
filterFolderId String
Filter search results by folder ID.
filterOrganizationId String
Filter search results by organization ID.
id String
Identifier.
search String
Search items matching the search string.
filterCollectionId string
Filter search results by collection ID.
filterFolderId string
Filter search results by folder ID.
filterOrganizationId string
Filter search results by organization ID.
id string
Identifier.
search string
Search items matching the search string.
filter_collection_id str
Filter search results by collection ID.
filter_folder_id str
Filter search results by folder ID.
filter_organization_id str
Filter search results by organization ID.
id str
Identifier.
search str
Search items matching the search string.
filterCollectionId String
Filter search results by collection ID.
filterFolderId String
Filter search results by folder ID.
filterOrganizationId String
Filter search results by organization ID.
id String
Identifier.
search String
Search items matching the search string.

getItemSecureNote Result

The following output properties are available:

Attachments List<GetItemSecureNoteAttachment>
List of item attachments.
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.
Favorite bool
Mark as a Favorite to have item appear at the top of your Vault in the UI.
Fields List<GetItemSecureNoteField>
Extra fields.
FolderId string
Identifier of the folder.
Name string
Name.
Notes string
Notes.
OrganizationId string
Identifier of the organization.
Reprompt bool
Require master password 're-prompt' when displaying secret in the UI.
RevisionDate string
Last time the item was updated.
FilterCollectionId string
Filter search results by collection ID.
FilterFolderId string
Filter search results by folder ID.
FilterOrganizationId string
Filter search results by organization ID.
Id string
Identifier.
Search string
Search items matching the search string.
Attachments []GetItemSecureNoteAttachment
List of item attachments.
CollectionIds []string
Identifier of the collections the item belongs to.
CreationDate string
Date the item was created.
DeletedDate string
Date the item was deleted.
Favorite bool
Mark as a Favorite to have item appear at the top of your Vault in the UI.
Fields []GetItemSecureNoteField
Extra fields.
FolderId string
Identifier of the folder.
Name string
Name.
Notes string
Notes.
OrganizationId string
Identifier of the organization.
Reprompt bool
Require master password 're-prompt' when displaying secret in the UI.
RevisionDate string
Last time the item was updated.
FilterCollectionId string
Filter search results by collection ID.
FilterFolderId string
Filter search results by folder ID.
FilterOrganizationId string
Filter search results by organization ID.
Id string
Identifier.
Search string
Search items matching the search string.
attachments List<GetItemSecureNoteAttachment>
List of item attachments.
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.
favorite Boolean
Mark as a Favorite to have item appear at the top of your Vault in the UI.
fields List<GetItemSecureNoteField>
Extra fields.
folderId String
Identifier of the folder.
name String
Name.
notes String
Notes.
organizationId String
Identifier of the organization.
reprompt Boolean
Require master password 're-prompt' when displaying secret in the UI.
revisionDate String
Last time the item was updated.
filterCollectionId String
Filter search results by collection ID.
filterFolderId String
Filter search results by folder ID.
filterOrganizationId String
Filter search results by organization ID.
id String
Identifier.
search String
Search items matching the search string.
attachments GetItemSecureNoteAttachment[]
List of item attachments.
collectionIds string[]
Identifier of the collections the item belongs to.
creationDate string
Date the item was created.
deletedDate string
Date the item was deleted.
favorite boolean
Mark as a Favorite to have item appear at the top of your Vault in the UI.
fields GetItemSecureNoteField[]
Extra fields.
folderId string
Identifier of the folder.
name string
Name.
notes string
Notes.
organizationId string
Identifier of the organization.
reprompt boolean
Require master password 're-prompt' when displaying secret in the UI.
revisionDate string
Last time the item was updated.
filterCollectionId string
Filter search results by collection ID.
filterFolderId string
Filter search results by folder ID.
filterOrganizationId string
Filter search results by organization ID.
id string
Identifier.
search string
Search items matching the search string.
attachments Sequence[GetItemSecureNoteAttachment]
List of item attachments.
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.
favorite bool
Mark as a Favorite to have item appear at the top of your Vault in the UI.
fields Sequence[GetItemSecureNoteField]
Extra fields.
folder_id str
Identifier of the folder.
name str
Name.
notes str
Notes.
organization_id str
Identifier of the organization.
reprompt bool
Require master password 're-prompt' when displaying secret in the UI.
revision_date str
Last time the item was updated.
filter_collection_id str
Filter search results by collection ID.
filter_folder_id str
Filter search results by folder ID.
filter_organization_id str
Filter search results by organization ID.
id str
Identifier.
search str
Search items matching the search string.
attachments List<Property Map>
List of item attachments.
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.
favorite Boolean
Mark as a Favorite to have item appear at the top of your Vault in the UI.
fields List<Property Map>
Extra fields.
folderId String
Identifier of the folder.
name String
Name.
notes String
Notes.
organizationId String
Identifier of the organization.
reprompt Boolean
Require master password 're-prompt' when displaying secret in the UI.
revisionDate String
Last time the item was updated.
filterCollectionId String
Filter search results by collection ID.
filterFolderId String
Filter search results by folder ID.
filterOrganizationId String
Filter search results by organization ID.
id String
Identifier.
search String
Search items matching the search string.

Supporting Types

GetItemSecureNoteAttachment

FileName This property is required. string
Id This property is required. string
Size This property is required. string
SizeName This property is required. string
Url This property is required. string
FileName This property is required. string
Id This property is required. string
Size This property is required. string
SizeName This property is required. string
Url This property is required. string
fileName This property is required. String
id This property is required. String
size This property is required. String
sizeName This property is required. String
url This property is required. String
fileName This property is required. string
id This property is required. string
size This property is required. string
sizeName This property is required. string
url This property is required. string
file_name This property is required. str
id This property is required. str
size This property is required. str
size_name This property is required. str
url This property is required. str
fileName This property is required. String
id This property is required. String
size This property is required. String
sizeName This property is required. String
url This property is required. String

GetItemSecureNoteField

Boolean This property is required. bool
Hidden This property is required. string
Linked This property is required. string
Name This property is required. string
Text This property is required. string
Boolean This property is required. bool
Hidden This property is required. string
Linked This property is required. string
Name This property is required. string
Text This property is required. string
boolean_ This property is required. Boolean
hidden This property is required. String
linked This property is required. String
name This property is required. String
text This property is required. String
boolean This property is required. boolean
hidden This property is required. string
linked This property is required. string
name This property is required. string
text This property is required. string
boolean This property is required. bool
hidden This property is required. str
linked This property is required. str
name This property is required. str
text This property is required. str
boolean This property is required. Boolean
hidden This property is required. String
linked This property is required. String
name This property is required. String
text This property is required. String

Package Details

Repository
bitwarden maxlaverse/terraform-provider-bitwarden
License
Notes
This Pulumi package is based on the bitwarden Terraform Provider.