Skip to content

Commit

Permalink
fix: add credential to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev authored Apr 18, 2024
1 parent aa0f7f2 commit 9c81816
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions onepassword/data_source_onepassword_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ func dataSourceOnepasswordItem() *schema.Resource {
Computed: true,
Sensitive: true,
},
"credential": {
Description: "Some description",
Type: schema.TypeString,
Optional: true,
Computed: true,
Sensitive: true,
},
"note_value": {
Description: noteValueDescription,
Type: schema.TypeString,
Expand Down Expand Up @@ -222,8 +229,8 @@ func dataSourceOnepasswordItemRead(ctx context.Context, data *schema.ResourceDat
}
}

if f.ID == "credential" {
data.Set("password", f.Value)
if f.ID == "credential" && item.Category == "API_CREDENTIAL" {
data.Set("credential", f.Value)
}
}

Expand Down

0 comments on commit 9c81816

Please sign in to comment.