feat: enhance 1Password lookup functionality with vault ID support and concealment option
Some checks failed
Nix Format Check / check-format (push) Failing after 37s

This commit is contained in:
2025-03-11 15:58:27 +01:00
parent 47fb912c15
commit d787b25917
3 changed files with 41 additions and 10 deletions

View File

@@ -14,8 +14,11 @@ password: "{{ lookup('onepassword', 'item-name') }}"
# Fetch specific field
api_key: "{{ lookup('onepassword', 'item-name', field='api_key') }}"
# Fetch from specific vault
database_password: "{{ lookup('onepassword', 'database', field='password', vault='Development') }}"
# Fetch from specific vault (using vault ID)
database_password: "{{ lookup('onepassword', 'database', field='password', vault='j7nmhqlsjmp2r6umly5t75hzb4') }}"
# Fetch a field without revealing it (for non-password fields)
note: "{{ lookup('onepassword', 'item-name', field='notes', reveal=false) }}"
```
### Prerequisites
@@ -24,5 +27,13 @@ database_password: "{{ lookup('onepassword', 'database', field='password', vault
2. Sign in to 1Password using `op signin`
3. Service account should be properly configured
### Finding Vault IDs
To find your vault ID:
```bash
op vault list
```
For more information, see the [1Password CLI documentation](https://developer.1password.com/docs/cli).
```