我正在尝试通过以下方式使用Terraform的1Password提供程序:
terraform {
required_providers {
onepassword = {
source = "milosbackonja/1password"
version = "1.1.0"
}
}
required_version = "~> 0.14"
backend "remote" {
organization = "my-co"
workspaces {
prefix = "my-"
}
}
}
provider "onepassword" {
email = "email@email.com"
password = var.onepassword_master_pass
secret_key = var.onepassword_secret_key
subdomain = "mycompany"
}Terraform似乎找到了提供程序并安装了它,但是我收到一个错误,说找不到它:
Initializing modules...
- onepassword in onepassword
Initializing the backend...
Successfully configured the backend "remote"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding latest version of hashicorp/onepassword...
- Finding hashicorp/aws versions matching "3.30.0"...
- Finding milosbackonja/1password versions matching "1.1.0"...
- Installing hashicorp/aws v3.30.0...
- Installed hashicorp/aws v3.30.0 (signed by HashiCorp)
- Installing milosbackonja/1password v1.1.0...
- Installed milosbackonja/1password v1.1.0 (self-signed, key ID 5B6898F46775F746)
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/onepassword: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/onepassword
If you have just upgraded directly from Terraform v0.12 to Terraform v0.14
then please upgrade to Terraform v0.13 first and follow the upgrade guide for
that release, which might help you address this problem.
Error: Terraform exited with code 1.
Error: Process completed with exit code 1.有什么建议吗?
发布于 2021-03-04 09:50:11
您的配置中似乎有另一个模块试图在不声明依赖项的情况下使用此提供程序。
您可以运行terraform providers来查看每个模块依赖于哪些提供者。注意任何列出hashicorp/1password而不是milosbackonja/1password的列表,并更新它们中的每一个,以包括与您在此处的问题中显示的类似的required_providers块,尽管在共享模块中,我们通常使用>=版本约束而不是确切的版本约束,以便在将来需要升级提供程序时避免协调问题。
https://stackoverflow.com/questions/66445537
复制相似问题