op vault create taccoform-demo
ID: REDACTED
Name: taccoform-demo
Type: USER_CREATED
Attribute version: 1
Content version: 1
Items: 0
Created: now
Updated: now
Create new secret: op item create --category=password --title='demo-secret' --vault taccoform-demo' 'password=passwordistaco'
op item create --category=password --title='demo-secret' --vault taccoform-demo 'password=passwordistaco'
ID: REDACTED
Title: demo-secret
Vault: REDACTED
Created: now
Updated: now
Favorite: false
Version: 0
Category: PASSWORD
Fields:
password: passwordistaco
Create secret for your DigitalOcean access token: op item create --category=password --title='do-token' --vault taccoform-demo 'password=DIGITALOCEANACCESSTOKENGOESHERE'
Set DigitalOcean environment variable: export DIGITALOCEAN_ACCESS_TOKEN=op://taccoform-demo/do-token/password
Use 1password cli to pass credentials to DigitalOcean CLI tool: op run -- doctl account get
You can also pass the credentials to a docker container: docker run --rm --interactive --tty --env-file <(op run --no-masking -- env | grep DIGITALOCEAN) digitalocean/doctl account get
Terraform
Set a DigitalOcean access token Terraform variable via environment variables: export TF_VAR_do_token=op://taccoform-demo/do-token/password
Check out the environment variable output: op run -- env | grep TF_VAR