Skip to content

Commit

Permalink
more doc
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlaverse committed Apr 19, 2024
1 parent 21afdb8 commit d667b03
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
7 changes: 6 additions & 1 deletion docs/data-sources/item_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Use this data source to get information on an existing Login.
## Example Usage

```terraform
# Find the identifier of the resource you want to import:
# Option 1: Find the identifier of the resource you want to import:
#
# $ bw list items --search "Mysql Root Credentials" | jq '.[] .id'
# ? Master password: [hidden]
Expand All @@ -25,6 +25,11 @@ data "bitwarden_item_login" "database_credentials" {
id = "ec4e447f-9aed-4203-b834-c8f3848828f7"
}
# Option 2: Use filters directly in the resource declaration
data "bitwarden_item_secure_note" "ssh_notes" {
search = "SSH Private Key"
}
# Later to be accessed as
# ... = data.bitwarden_item_login.database_credentials.username
# ... = data.bitwarden_item_login.database_credentials.password
Expand Down
7 changes: 6 additions & 1 deletion docs/data-sources/item_secure_note.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Use this data source to get information on an existing Secure Note.
## Example Usage

```terraform
# Find the identifier of the resource you want to import:
# Option 1: Find the identifier of the resource you want to import:
#
# $ bw list items --search "SSH Private Key" | jq '.[] .id'
# ? Master password: [hidden]
Expand All @@ -25,6 +25,11 @@ data "bitwarden_item_secure_note" "ssh_notes" {
id = "a9e19f26-1b8c-4568-bc09-191e2cf56ed6"
}
# Option 2: Use filters directly in the resource declaration
data "bitwarden_item_secure_note" "ssh_notes" {
search = "SSH Private Key"
}
# Later to be accessed as
# ... = data.bitwarden_item_secure_note.ssh_notes.notes
#
Expand Down
7 changes: 6 additions & 1 deletion examples/data-sources/bitwarden_item_login/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Find the identifier of the resource you want to import:
# Option 1: Find the identifier of the resource you want to import:
#
# $ bw list items --search "Mysql Root Credentials" | jq '.[] .id'
# ? Master password: [hidden]
Expand All @@ -10,6 +10,11 @@ data "bitwarden_item_login" "database_credentials" {
id = "ec4e447f-9aed-4203-b834-c8f3848828f7"
}

# Option 2: Use filters directly in the resource declaration
data "bitwarden_item_secure_note" "ssh_notes" {
search = "SSH Private Key"
}

# Later to be accessed as
# ... = data.bitwarden_item_login.database_credentials.username
# ... = data.bitwarden_item_login.database_credentials.password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Find the identifier of the resource you want to import:
# Option 1: Find the identifier of the resource you want to import:
#
# $ bw list items --search "SSH Private Key" | jq '.[] .id'
# ? Master password: [hidden]
Expand All @@ -10,6 +10,11 @@ data "bitwarden_item_secure_note" "ssh_notes" {
id = "a9e19f26-1b8c-4568-bc09-191e2cf56ed6"
}

# Option 2: Use filters directly in the resource declaration
data "bitwarden_item_secure_note" "ssh_notes" {
search = "SSH Private Key"
}

# Later to be accessed as
# ... = data.bitwarden_item_secure_note.ssh_notes.notes
#
Expand Down
2 changes: 1 addition & 1 deletion examples/quick/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "bitwarden_item_secure_note" "vpn_note" {
# Read sensitive information from Bitwarden
# Using Login information
data "bitwarden_item_login" "mysql_credentials" {
id = "ec4e447f-9aed-4203-b834-c8f3848828f7"
search = "mysql/server-1"
}

# Later to be accessed as
Expand Down

0 comments on commit d667b03

Please sign in to comment.