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

Terraform plugin throws version error with op CLI #147

Closed
herda05 opened this issue Jan 20, 2024 · 1 comment
Closed

Terraform plugin throws version error with op CLI #147

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

Comments

@herda05
Copy link

herda05 commented Jan 20, 2024

Your environment

Terraform Provider Version: 1.4.1
Connect Server Version: n/a
CLI Version: 2.23.0-beta.01
OS: MacOS Ventura 13.4.1
Terraform Version: 1.6.4

What happened?

run a terraform plan and recieve the following error:

Error: failed to get version of op CLI: Version segment starts with 0 (input is: 2.23.0-beta.01)

What did you expect to happen?

The main.tf:
provider "onepassword" {
account = XXXXXXXXXXXXXXXXXXXXXX
op_cli_path = "/usr/local/bin/op"
}

data "onepassword_item" "ans_pub_key" {
vault = XXXXXXXXXXXXXXXXXX
title = "ansadmin_dev_key"
}

output "one_pass" {
value = data.onepassword_item.ans_pub_key
}

Steps to reproduce

  1. Create main.tf with the above code.
  2. execute terraform plan in the same directory

Notes & Logs

I can run the op command just fine. I needed to upgrade the op client to get the terraform plugin.

@herda05 herda05 added the bug Something isn't working label Jan 20, 2024
@volodymyrZotov
Copy link
Collaborator

volodymyrZotov commented Jan 22, 2024

@herda05 Hi. The problem is that you used a beta version. As per semantic versioniong, the beta version is considered less than prod version aka v2.23.0-beta01 < v2.23.0. The provider is required to use version >=v2.23.0.

So, to use it, either install cli v2.23.0 or the next stable v2.24.0.

Anyway, it's a good call out that it should work with beta versions. Here is an issue to address it. #148
Thank you!

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

2 participants