Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read from more than 5 vaults #130

Open
eval-on-point opened this issue Jan 10, 2024 · 1 comment
Open

Cannot read from more than 5 vaults #130

eval-on-point opened this issue Jan 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@eval-on-point
Copy link

eval-on-point commented Jan 10, 2024

Your environment

Terraform Provider Version: 1.4.0

CLI Version: 2.24.0

OS: Linux

Terraform Version: Terraform v1.6.4-dev

What happened?

Consider the following main.tf:

terraform {
  required_providers {
    onepassword = {
      source  = "1Password/onepassword"
      version = "1.4.0"
    }
  }
}

provider "onepassword" {}

data "onepassword_vault" "op-provider-test-1" {
  name = "op-provider-test-1"
}

data "onepassword_vault" "op-provider-test-2" {
  name = "op-provider-test-2"
}

data "onepassword_vault" "op-provider-test-3" {
  name = "op-provider-test-3"
}

data "onepassword_vault" "op-provider-test-4" {
  name = "op-provider-test-4"
}

data "onepassword_vault" "op-provider-test-5" {
  name = "op-provider-test-5"
}

data "onepassword_vault" "op-provider-test-6" {
  name = "op-provider-test-6"
}

Running terraform apply with this fails:

$ terraform apply
data.onepassword_vault.op-provider-test-6: Reading...
data.onepassword_vault.op-provider-test-3: Reading...
data.onepassword_vault.op-provider-test-4: Reading...
data.onepassword_vault.op-provider-test-1: Reading...
data.onepassword_vault.op-provider-test-2: Reading...
data.onepassword_vault.op-provider-test-5: Reading...
data.onepassword_vault.op-provider-test-6: Read complete after 1s [id=vaults/2upjcxqqyjcturg6jpqavdj2qy]
data.onepassword_vault.op-provider-test-3: Read complete after 2s [id=vaults/wb5spdqfj4e3klul77z2r4vxey]
data.onepassword_vault.op-provider-test-4: Read complete after 3s [id=vaults/kp63exjxzq6ly4gwxw7hquznfm]
data.onepassword_vault.op-provider-test-1: Read complete after 4s [id=vaults/z6smimqr32mhuuttkqqtl5qsua]
data.onepassword_vault.op-provider-test-2: Read complete after 5s [id=vaults/o2qdpzvmkdubub5hfgknebmwxy]
╷
│ Error: op error: connecting to desktop app: connecting to desktop app timed out, make sure it is installed, running and CLI integration is enabled
│ 
│   with data.onepassword_vault.op-provider-test-5,
│   on main.tf line 28, in data "onepassword_vault" "op-provider-test-5":
│   28: data "onepassword_vault" "op-provider-test-5" {
│ 
╵

However, the apply works when I comment out one of the data sources:

$ terraform apply
data.onepassword_vault.op-provider-test-4: Reading...
data.onepassword_vault.op-provider-test-3: Reading...
data.onepassword_vault.op-provider-test-1: Reading...
data.onepassword_vault.op-provider-test-2: Reading...
data.onepassword_vault.op-provider-test-5: Reading...
data.onepassword_vault.op-provider-test-4: Read complete after 0s [id=vaults/kp63exjxzq6ly4gwxw7hquznfm]
data.onepassword_vault.op-provider-test-1: Read complete after 1s [id=vaults/z6smimqr32mhuuttkqqtl5qsua]
data.onepassword_vault.op-provider-test-3: Read complete after 2s [id=vaults/wb5spdqfj4e3klul77z2r4vxey]
data.onepassword_vault.op-provider-test-2: Read complete after 3s [id=vaults/o2qdpzvmkdubub5hfgknebmwxy]
data.onepassword_vault.op-provider-test-5: Read complete after 4s [id=vaults/4o6wirrqb3ge3xedhecmyvyj24]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences,
so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

What did you expect to happen?

I expected to be able to use all the vaults in my 1password account as data sources.

Steps to reproduce

  1. Run tf apply with the above mentioned main.tf.

Notes & Logs

Note that I am using the 1password Desktop GUI integration with the 1password CLI to retrieve the 1Password data. I appear to have lost the ability to use the CLI without the Desktop GUI altogether.

EDIT: removed link to unrelated issue.

@eval-on-point eval-on-point added the bug Something isn't working label Jan 10, 2024
@eval-on-point
Copy link
Author

The workaround mentioned in #140 (comment) seems to also work here. Perhaps the fix on the 1Password CLI side could also lead to a fix on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant