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 import onepassword? #176

Closed
avazula opened this issue Jan 19, 2024 · 1 comment
Closed

Cannot import onepassword? #176

avazula opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@avazula
Copy link

avazula commented Jan 19, 2024

Hi,

Though I see it in the providers folders, I cannot manage to import it in my Tofu stack.

provider "onepassword" {
  url                   = var.url
  token                 = var.op_connect_token
  service_account_token = var.service_account_token
  account               = var.account
  op_cli_path           = var.op_cli_path
}

Upon running tofu init, I get this error message:


Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/onepassword versions matching ">= 1.4.1"...
╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider hashicorp/onepassword: provider registry registry.opentofu.org does not have a provider named
│ registry.opentofu.org/hashicorp/onepassword
│ 
│ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently
│ depending on hashicorp/onepassword, run the following command:
│     tofu providers
│ 
│ If you believe this provider is missing from the registry, please submit a issue on the OpenTofu Registry https://github.com/opentofu/registry/issues/
╵

Running tofu providers as suggested gives me this output:

Providers required by configuration:
.
└── provider[registry.opentofu.org/hashicorp/onepassword] >= 1.4.1

Is 1password not available yet?

OpenTofu Version

v1.6.0 on darwin_arm64

OpenTofu Configuration Files

provider "onepassword" {
  url                   = var.url
  token                 = var.op_connect_token
  service_account_token = var.service_account_token
  account               = var.account
  op_cli_path           = var.op_cli_path
}
@avazula avazula added the bug Something isn't working label Jan 19, 2024
@avazula
Copy link
Author

avazula commented Jan 19, 2024

Nevermind! I realized that the source must be provided in the required providers:

  required_providers {
    onepassword = {
      source = "1Password/onepassword"
      version = ">= 1.4.1"
    }

Apologies for the hassle. Have a nice day!

@avazula avazula closed this as completed Jan 19, 2024
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