https://github.com/winebarrel/terraform-provider-op
Terraform provider for 1Password CLI.
https://github.com/winebarrel/terraform-provider-op
1password-cli terraform
Last synced: 6 months ago
JSON representation
Terraform provider for 1Password CLI.
- Host: GitHub
- URL: https://github.com/winebarrel/terraform-provider-op
- Owner: winebarrel
- License: mit
- Created: 2023-08-20T07:16:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T23:27:51.000Z (about 2 years ago)
- Last Synced: 2024-10-19T00:14:35.453Z (over 1 year ago)
- Topics: 1password-cli, terraform
- Language: Go
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-op
Terraform provider for [1Password CLI](https://developer.1password.com/docs/cli/).
## Preparation
Install 1Password CLI.
see https://developer.1password.com/docs/cli/get-started/
## Usage
```tf
terraform {
required_providers {
op = {
source = "winebarrel/op"
}
}
}
provider "op" {
# command = "/usr/local/bin/op"
}
data "op_item" "yahoo" {
# id = "xxx..."
title = "yahoo"
}
output "yahoo_username" {
value = data.op_item.yahoo.username
}
output "yahoo_password" {
value = data.op_item.yahoo.password
sensitive = true
}
output "yahoo_field_value" {
value = data.op_item.yahoo.fields["my-label"]
}
```
## Run locally for development
```sh
cp op.tf.sample op.tf
make tf-plan
```