opensearch-project / terraform-provider-opensearch

https://registry.terraform.io/providers/opensearch-project/opensearch
Apache License 2.0
74 stars 58 forks source link

[BUG] opengpg: key expired #177

Closed coolapso closed 5 months ago

coolapso commented 6 months ago

What is the bug?

gpg key seems to have been expired, not possible to install terraform provider

❯terraform init

Initializing the backend...

Initializing provider plugins...
- Finding opensearch-project/opensearch versions matching "2.2.1"...
- Installing opensearch-project/opensearch v2.2.1...
╷
│ Error: Failed to install provider
│
│ Error while installing opensearch-project/opensearch v2.2.1: error checking signature: openpgp: key expired

How can one reproduce the bug?

terraform {
  required_version = ">= 0.13"
  required_providers {
    opensearch = {
      source = "opensearch-project/opensearch"
      version = "2.2.1"
    }
  }
}

provider "opensearch" { 
  endpoint = "https://cluster.domain"
}

resource "opensearch_index_template" "this" {
  name = "test"
  body = file(mappings.json)
}

What is the expected behavior?

Provider to be installed

What is your host/environment?

❯uname -a
Linux nebu 6.8.2-zen2-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:20 +0000 x86_64 GNU/Linux

Do you have any screenshots?

n/a

Do you have any additional context?

 ❯terraform --version
Terraform v1.6.0
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.7.5. You can update by downloading from https://www.terraform.io/downloads.html
coolapso commented 6 months ago

Downgradint to terraform 1.5.7 works:

 ❯terraform --version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/opensearch-project/opensearch v2.1.0

Your version of Terraform is out of date! The latest version
is 1.7.5. You can update by downloading from https://www.terraform.io/downloads.html

Initializing the backend...

Initializing provider plugins...
- Finding opensearch-project/opensearch versions matching "2.1.0"...
- Installing opensearch-project/opensearch v2.1.0...
- Installed opensearch-project/opensearch v2.1.0 (self-signed, key ID C9D54034F594D145)

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

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

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.
coolapso commented 6 months ago

Seems provider version >= 2.2.0 requires at least terraform 1.6.1, maybe this should be noted somewhere? thank you

rblcoder commented 5 months ago

There was a fix in Terraform 1.6.1 https://github.com/hashicorp/terraform/issues/33984 https://github.com/hashicorp/terraform/blob/v1.6/CHANGELOG.md#161-october-10-2023 The issue is not specific to OpenSearch provider.

coolapso commented 5 months ago

Shouldn't there be a constraint or some documentation informing about that somewhere? thank you!

rblcoder commented 5 months ago

Many providers were affected by the issue https://github.com/confluentinc/terraform-provider-confluent/issues/315#issuecomment-1751607781

coolapso commented 5 months ago

Thank you.