terraform-provider-onepassword icon indicating copy to clipboard operation
terraform-provider-onepassword copied to clipboard

Use the 1Password Terraform Provider to reference, create, or update items in your 1Password Vaults.

1Password Terraform provider

Use the 1Password Terraform provider to access and manage items in your 1Password vaults.

Get started

✨ Get started

  • See the examples directory for detailed examples.
  • Detailed documentation for using this provider can be found on the Terraform Registry docs.
terraform {
  required_providers {
    onepassword = {
      source = "1Password/onepassword"
      version = "~> 2.0.0"
    }
  }
}

provider "onepassword" {
  service_account_token = "<1Password service account token>"
}

variable "vault_id" {}

resource "onepassword_item" "demo_login" {
  vault = var.vault_id

  title    = "Demo Terraform Login"
  category = "password"

  username = "demo-username"

  password_recipe {
    length  = 40
    symbols = false
  }
}

🛠️ Contributing

For the contribution guidelines, see CONTRIBUTING.md.

Still not sure where or how to begin? We're happy to help! You can join the Developer Slack workspace, and ask us any questions there.

💙 Community & Support

🔐 Security

1Password requests you practice responsible disclosure if you discover a vulnerability.

Please file requests via BugCrowd.

For information about security practices, please visit the 1Password Bug Bounty Program.