1Password / install-cli-action

Install 1Password CLI into your GitHub Actions jobs.
https://developer.1password.com
MIT License
36 stars 12 forks source link

Failed to get version of op CLI: failed to execute command: exec: "op": executable file not found in $PATH #5

Closed jflord-srt closed 7 months ago

jflord-srt commented 7 months ago

Hello,

We are trying to use "install-cli-action" to install the 1Password cli in GitHub actions. We are using the 1Password Terraform provider to try and load secrets, but it appears that this install is not available to the Terraform provider..

│ Error: failed to get version of op CLI: failed to execute command: exec: "op": executable file not found in $PATH │ │ with data.onepassword_item.op_item, │ on main.tf line 6, in data "onepassword_item" "op_item": │ 6: data "onepassword_item" "op_item" { │

Just wondering if there is anything we need to do to make this install available to Terraform? We are not setting any paths on the Terraform provider, so not sure why it can't find the cli. We did notice the the install script unpacks to a tmp folder and then sets the GITHUB_PATH, but that does not appear to allow the Terraform provider to find the "op" command.

We are probably just missing something simple, but before we try and script the install ourselves, I figured I would ask here for some guidance.

Thank you

jflord-srt commented 7 months ago

We figured out our issue... Turns out we are using "gruntwork-io/terragrunt-action@v2" to run Terraform, which executes in a container. Installing the 1password cli with "install-cli-action" installs on the runner, so that explains our pathing issue.