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

Error verifying GPG signature for provider "cyberark/conjur" #93

Open
2 tasks
JfcAtCyberArk opened this issue Sep 8, 2021 · 3 comments
Open
2 tasks

Comments

@JfcAtCyberArk
Copy link

Summary

Unable to use Conjur provider for Terraform.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Using this simple main.tf
provider "aws" {
  version = "~> 2.0"
  region = "eu-west-3"
}


provider "cyberark/conjur" {
  version = "0.6.2"
}
  1. And this docker image: hashicorp/terraform:latest (2021/09/08)

  2. Terraform init fails with the below error:

Creating conjur_playground_terraform_run ... done

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...

Error verifying GPG signature for provider "cyberark/conjur"
Terraform was unable to verify the GPG signature of the downloaded provider
files using the keys downloaded from the Terraform Registry. This may mean that
the publisher of the provider removed the key it was signed with, or that the
distributed files were changed after this version was released.


Error: unable to verify signature


ERROR: 1

Expected Results

Terraform init succeeds

Actual Results (including error logs, if applicable)

Terraform init fails with GPG error (see above)

Reproducible

  • [X ] Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

latest (0.6.2)

@JfcAtCyberArk
Copy link
Author

EDIT
I was using an older version of Terraform Docker image version 0.12
It works with actual latest image (2021/09/08 : 1.0.6)

@ismarc
Copy link
Contributor

ismarc commented Sep 8, 2021

0.13.0 seems to work without issue with the following main.tf:

terraform {
  required_providers {
    conjur = {
      source = "cyberark/conjur"
      version = "0.6.2"
    }
  }
}

provider "conjur" {}

data "conjur_secret" "myfetchedsecret" {
  name = "dev/openshift/next/version"
}

resource "local_file" "myfetchedsecret-to-file" {
  content = data.conjur_secret.myfetchedsecret.value
  filename = "${path.module}/../myfetchedsecret"
  file_permission = "0664"
}
docker run --rm -it -v $(pwd):$(pwd) --workdir $(pwd) --entrypoint sh hashicorp/terraform:0.13.0
Unable to find image 'hashicorp/terraform:0.13.0' locally
0.13.0: Pulling from hashicorp/terraform
df20fa9351a1: Already exists
488a02600879: Pull complete
7813c92e63e1: Pull complete
Digest: sha256:a017ce0e0c8ba1c80dc2db519aa3aa969bf0e64d98c5a8b262267509a5d21a12
Status: Downloaded newer image for hashicorp/terraform:0.13.0
/Users/Matthew.Brace/temp/terraform-provider # terraform init

Initializing the backend...

Initializing provider plugins...
- Finding cyberark/conjur versions matching "0.6.2"...
- Finding latest version of hashicorp/local...
- Installing cyberark/conjur v0.6.2...
- Installed cyberark/conjur v0.6.2 (self-signed, key ID A83D2D8A08BEAA44)
- Installing hashicorp/local v2.1.0...
- Installed hashicorp/local v2.1.0 (self-signed, key ID 34365D9472D7468F)

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/plugins/signing.html

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* hashicorp/local: version = "~> 2.1.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

@JfcAtCyberArk
Copy link
Author

Reproduced as well, many thanks @ismarc !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants