anasinnyk/terraform-provider-onepassword

Error: Cannot signin: exit status 189

Closed this issue · 7 comments

Hello,

we were using this provider from some moths and suddenly stops working. When we run terraform this error is shown:

`Error: Cannot signin: exit status 189

on main.tf line 24, in provider "onepassword":
24: provider "onepassword" {`

We are using the last version of the provider (0.5.0), the last version of 1password (7.4.3) and 0.12.20 version of Terraform. We also tried with older versions on the provider and 1password but the error persists.

Any help will be appreciated.

Thanks and regards.

Hi @anasinnyk,

I have also bumped into the error described by @apxela above.

This is what I found out:
The current provider version (0.5.0), or event the master branch, are hardcoded to version 0.5.5 of the 1password OP client. This software is no longer notarised by Apple and therefore not runnable in Catalina OSX.
Additionally, OP version number can't be updated without modifying the code, as latest versions of OP come packaged as PKG files and not as ZIP.

As a temporal workaround, I symlinked my local OP installation to the tmp path the provider looks into:

mkdir -p /tmp/terraform-provider-onepassword/0.9.2; ln -s /usr/local/bin/op /tmp/terraform-provider-onepassword/0.9.2/op

I would love to contribute but my knowledge of go is too limited.
Thank you

Edit: this seems not to be working as intended. Am updating to get it fixed.

Using what @jandro said about the problem, I decided to simply not run this in Mac. Instead, I created a small Dockerfile which allows me to use the Linux distribution.

For those interested:

FROM hashicorp/terraform:0.12.0

WORKDIR /app

COPY . .

CMD [ "terraform" ]
{
  "name": "@foobar-dev/tf",
  "private": true,
  "version": "0.0.0",
  "scripts": {
    "prestart": "yarn docker:run init",
    "start": "yarn docker:run plan",
    "build": "docker image build -t foobar-dev/tf .",
    "docker:run": "docker run -v $(pwd):/app -w /app foobar-dev/tf"
  }
}

Then I can run:

$ yarn docker:run init
$ yarn docker:run apply
$ yarn docker:run plan

@apxela @jandro @Charlex sorry guys, I had a lot of work in my main job. But you can override op version via environment variable. Try to use OP_VERSION with op version what you need.

Hi @anasinnyk,

Thank you for your suggestion. Unfortunately this wouldn't work, since Agilebits is not releasing the 1P cli in ZIP format anymore, it's a PKG.

Regards

To add color I get this same error on Ubuntu

It seems like the best thing to do here would be to check that a minimum version is installed, if it's not, try to install it for us.

Two ways to fix this:

  1. Build/run my version of the plugin (#33) You'll need to install the cli yourself if you want a version from the .pkg era
  2. export OP_VERSION=0.7.1 ; terraform plan ; terraform apply

0.7.1 is the LAST version of the CLI in .zip format.