opentofu / registry

The all-new opentofu.org registry!
https://search.opentofu.org
Apache License 2.0
320 stars 36 forks source link

Cannot import onepassword? #176

Closed avazula closed 8 months ago

avazula commented 8 months ago

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 commented 8 months ago

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!