Skip to content

Commit

Permalink
Add SSH Key as a supported category for item data source
Browse files Browse the repository at this point in the history
  • Loading branch information
edif2008 committed Jun 17, 2024
1 parent 5385c43 commit 4e72470
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/item.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data "onepassword_item" "example" {

### Read-Only

- `category` (String) The category of the item. One of ["login" "password" "database" "secure_note" "document"]
- `category` (String) The category of the item. One of ["login" "password" "database" "secure_note" "document" "ssh_key"]
- `credential` (String, Sensitive) API credential for this item.
- `database` (String) (Only applies to the database category) The name of the database.
- `file` (Block List) A list of files attached to the item. (see [below for nested schema](#nestedblock--file))
Expand Down
5 changes: 4 additions & 1 deletion internal/provider/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ var (
strings.ToLower(string(op.Database)),
strings.ToLower(string(op.SecureNote)),
}
dataSourceCategories = append(categories, strings.ToLower(string(op.Document)))
dataSourceCategories = append(categories,
strings.ToLower(string(op.Document)),
strings.ToLower(string(op.SSHKey)),
)

fieldPurposes = []string{
string(op.FieldPurposeUsername),
Expand Down

0 comments on commit 4e72470

Please sign in to comment.