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

bitwarden.getItemLogin

Explore with Pulumi AI

bitwarden logo
bitwarden 0.13.6 published on Thursday, Apr 17, 2025 by maxlaverse

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitwarden from "@pulumi/bitwarden";
    import * as kubernetes from "@pulumi/kubernetes";
    
    const vpnCredentialsItemLogin = bitwarden.getItemLogin({
        search: "VPN/Credentials",
    });
    // Example of usage of the data source:
    const vpnCredentialskubernetes_secret = new kubernetes.index.Kubernetes_secret("vpnCredentialskubernetes_secret", {
        metadata: [{
            name: "vpn-credentials",
        }],
        data: {
            USERNAME: data.bitwarden_item_secure_note.vpn_credentials.username,
            PASSWORD: data.bitwarden_item_secure_note.vpn_credentials.password,
        },
    });
    
    import pulumi
    import pulumi_bitwarden as bitwarden
    import pulumi_kubernetes as kubernetes
    
    vpn_credentials_item_login = bitwarden.get_item_login(search="VPN/Credentials")
    # Example of usage of the data source:
    vpn_credentialskubernetes_secret = kubernetes.index.Kubernetes_secret("vpnCredentialskubernetes_secret",
        metadata=[{
            name: vpn-credentials,
        }],
        data={
            USERNAME: data.bitwarden_item_secure_note.vpn_credentials.username,
            PASSWORD: data.bitwarden_item_secure_note.vpn_credentials.password,
        })
    
    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 {
    		_, err := bitwarden.LookupItemLogin(ctx, &bitwarden.LookupItemLoginArgs{
    			Search: pulumi.StringRef("VPN/Credentials"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Example of usage of the data source:
    		_, err = kubernetes.NewKubernetes_secret(ctx, "vpnCredentialskubernetes_secret", &kubernetes.Kubernetes_secretArgs{
    			Metadata: []map[string]interface{}{
    				map[string]interface{}{
    					"name": "vpn-credentials",
    				},
    			},
    			Data: map[string]interface{}{
    				"USERNAME": data.Bitwarden_item_secure_note.Vpn_credentials.Username,
    				"PASSWORD": data.Bitwarden_item_secure_note.Vpn_credentials.Password,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitwarden = Pulumi.Bitwarden;
    using Kubernetes = Pulumi.Kubernetes;
    
    return await Deployment.RunAsync(() => 
    {
        var vpnCredentialsItemLogin = Bitwarden.GetItemLogin.Invoke(new()
        {
            Search = "VPN/Credentials",
        });
    
        // Example of usage of the data source:
        var vpnCredentialskubernetes_secret = new Kubernetes.Index.Kubernetes_secret("vpnCredentialskubernetes_secret", new()
        {
            Metadata = new[]
            {
                
                {
                    { "name", "vpn-credentials" },
                },
            },
            Data = 
            {
                { "USERNAME", data.Bitwarden_item_secure_note.Vpn_credentials.Username },
                { "PASSWORD", data.Bitwarden_item_secure_note.Vpn_credentials.Password },
            },
        });
    
    });
    
    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.GetItemLoginArgs;
    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 vpnCredentialsItemLogin = BitwardenFunctions.getItemLogin(GetItemLoginArgs.builder()
                .search("VPN/Credentials")
                .build());
    
            // Example of usage of the data source:
            var vpnCredentialskubernetes_secret = new Kubernetes_secret("vpnCredentialskubernetes_secret", 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());
    
        }
    }
    
    resources:
      # Example of usage of the data source:
      vpnCredentialskubernetes_secret:
        type: kubernetes:kubernetes_secret
        properties:
          metadata:
            - name: vpn-credentials
          data:
            USERNAME: ${data.bitwarden_item_secure_note.vpn_credentials.username}
            PASSWORD: ${data.bitwarden_item_secure_note.vpn_credentials.password}
    variables:
      vpnCredentialsItemLogin:
        fn::invoke:
          function: bitwarden:getItemLogin
          arguments:
            search: VPN/Credentials
    

    Using getItemLogin

    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 getItemLogin(args: GetItemLoginArgs, opts?: InvokeOptions): Promise<GetItemLoginResult>
    function getItemLoginOutput(args: GetItemLoginOutputArgs, opts?: InvokeOptions): Output<GetItemLoginResult>
    def get_item_login(filter_collection_id: Optional[str] = None,
                       filter_folder_id: Optional[str] = None,
                       filter_organization_id: Optional[str] = None,
                       filter_url: Optional[str] = None,
                       id: Optional[str] = None,
                       search: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetItemLoginResult
    def get_item_login_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,
                       filter_url: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       search: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetItemLoginResult]
    func LookupItemLogin(ctx *Context, args *LookupItemLoginArgs, opts ...InvokeOption) (*LookupItemLoginResult, error)
    func LookupItemLoginOutput(ctx *Context, args *LookupItemLoginOutputArgs, opts ...InvokeOption) LookupItemLoginResultOutput

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

    public static class GetItemLogin 
    {
        public static Task<GetItemLoginResult> InvokeAsync(GetItemLoginArgs args, InvokeOptions? opts = null)
        public static Output<GetItemLoginResult> Invoke(GetItemLoginInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetItemLoginResult> getItemLogin(GetItemLoginArgs args, InvokeOptions options)
    public static Output<GetItemLoginResult> getItemLogin(GetItemLoginArgs args, InvokeOptions options)
    
    fn::invoke:
      function: bitwarden:index/getItemLogin:getItemLogin
      arguments:
        # arguments dictionary

    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.
    FilterUrl string
    Filter search results by URL.
    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.
    FilterUrl string
    Filter search results by URL.
    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.
    filterUrl String
    Filter search results by URL.
    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.
    filterUrl string
    Filter search results by URL.
    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.
    filter_url str
    Filter search results by URL.
    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.
    filterUrl String
    Filter search results by URL.
    id String
    Identifier.
    search String
    Search items matching the search string.

    getItemLogin Result

    The following output properties are available:

    Attachments List<GetItemLoginAttachment>
    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<GetItemLoginField>
    Extra fields.
    FolderId string
    Identifier of the folder.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    Password string
    Login password.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    RevisionDate string
    Last time the item was updated.
    Totp string
    Verification code.
    Uris List<GetItemLoginUri>
    URI.
    Username string
    Login username.
    FilterCollectionId string
    Filter search results by collection ID.
    FilterFolderId string
    Filter search results by folder ID.
    FilterOrganizationId string
    Filter search results by organization ID.
    FilterUrl string
    Filter search results by URL.
    Id string
    Identifier.
    Search string
    Search items matching the search string.
    Attachments []GetItemLoginAttachment
    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 []GetItemLoginField
    Extra fields.
    FolderId string
    Identifier of the folder.
    Name string
    Name.
    Notes string
    Notes.
    OrganizationId string
    Identifier of the organization.
    Password string
    Login password.
    Reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    RevisionDate string
    Last time the item was updated.
    Totp string
    Verification code.
    Uris []GetItemLoginUri
    URI.
    Username string
    Login username.
    FilterCollectionId string
    Filter search results by collection ID.
    FilterFolderId string
    Filter search results by folder ID.
    FilterOrganizationId string
    Filter search results by organization ID.
    FilterUrl string
    Filter search results by URL.
    Id string
    Identifier.
    Search string
    Search items matching the search string.
    attachments List<GetItemLoginAttachment>
    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<GetItemLoginField>
    Extra fields.
    folderId String
    Identifier of the folder.
    name String
    Name.
    notes String
    Notes.
    organizationId String
    Identifier of the organization.
    password String
    Login password.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate String
    Last time the item was updated.
    totp String
    Verification code.
    uris List<GetItemLoginUri>
    URI.
    username String
    Login username.
    filterCollectionId String
    Filter search results by collection ID.
    filterFolderId String
    Filter search results by folder ID.
    filterOrganizationId String
    Filter search results by organization ID.
    filterUrl String
    Filter search results by URL.
    id String
    Identifier.
    search String
    Search items matching the search string.
    attachments GetItemLoginAttachment[]
    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 GetItemLoginField[]
    Extra fields.
    folderId string
    Identifier of the folder.
    name string
    Name.
    notes string
    Notes.
    organizationId string
    Identifier of the organization.
    password string
    Login password.
    reprompt boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate string
    Last time the item was updated.
    totp string
    Verification code.
    uris GetItemLoginUri[]
    URI.
    username string
    Login username.
    filterCollectionId string
    Filter search results by collection ID.
    filterFolderId string
    Filter search results by folder ID.
    filterOrganizationId string
    Filter search results by organization ID.
    filterUrl string
    Filter search results by URL.
    id string
    Identifier.
    search string
    Search items matching the search string.
    attachments Sequence[GetItemLoginAttachment]
    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[GetItemLoginField]
    Extra fields.
    folder_id str
    Identifier of the folder.
    name str
    Name.
    notes str
    Notes.
    organization_id str
    Identifier of the organization.
    password str
    Login password.
    reprompt bool
    Require master password 're-prompt' when displaying secret in the UI.
    revision_date str
    Last time the item was updated.
    totp str
    Verification code.
    uris Sequence[GetItemLoginUri]
    URI.
    username str
    Login username.
    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.
    filter_url str
    Filter search results by URL.
    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.
    password String
    Login password.
    reprompt Boolean
    Require master password 're-prompt' when displaying secret in the UI.
    revisionDate String
    Last time the item was updated.
    totp String
    Verification code.
    uris List<Property Map>
    URI.
    username String
    Login username.
    filterCollectionId String
    Filter search results by collection ID.
    filterFolderId String
    Filter search results by folder ID.
    filterOrganizationId String
    Filter search results by organization ID.
    filterUrl String
    Filter search results by URL.
    id String
    Identifier.
    search String
    Search items matching the search string.

    Supporting Types

    GetItemLoginAttachment

    FileName string
    Id string
    Size string
    SizeName string
    Url string
    FileName string
    Id string
    Size string
    SizeName string
    Url string
    fileName String
    id String
    size String
    sizeName String
    url String
    fileName string
    id string
    size string
    sizeName string
    url string
    file_name str
    id str
    size str
    size_name str
    url str
    fileName String
    id String
    size String
    sizeName String
    url String

    GetItemLoginField

    Boolean bool
    Hidden string
    Linked string
    Name string
    Text string
    Boolean bool
    Hidden string
    Linked string
    Name string
    Text string
    boolean_ Boolean
    hidden String
    linked String
    name String
    text String
    boolean boolean
    hidden string
    linked string
    name string
    text string
    boolean bool
    hidden str
    linked str
    name str
    text str
    boolean Boolean
    hidden String
    linked String
    name String
    text String

    GetItemLoginUri

    Match string
    Value string
    Match string
    Value string
    match String
    value String
    match string
    value string
    match str
    value str
    match String
    value String

    Package Details

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