ldcorentin/terraform-provider-klayer

Incorrect source link in terraform registry manifest

Closed this issue ยท 5 comments

Hi bro, sorry to bother you...

Wanted to use your cool provider for Klayers with my CDKTF stack.
However, CDKTF for some reason requires the source link be correct in terraform manifest, here: https://registry.terraform.io/v1/providers/ldcorentin/klayers
As you may see the source link there is "https://github.com/ldcorentin/terraform-provider-klayers" which is not correct.

I'm getting the following error when trying to generate typescript constructs for the provider with the command cdktf get:

๐Ÿ‘พ get | cdktf get
โ ธ downloading and generating modules and providers...
โ•ท
โ”‚ Error: Failed to install provider
โ”‚ 
โ”‚ Error while installing ldcorentin/klayers v2.0.3: could not query provider
โ”‚ registry for registry.terraform.io/ldcorentin/klayers: failed to retrieve
โ”‚ authentication checksums for provider: 404 Not Found returned from
โ”‚ github.com
โ•ต
Error: non-zero exit code 1

I was hoping to find a bug in the code and raise a PR, but apparently, it's configured somewhere in the terraform registry.
Could you fix it, please, if possible?

Cheers

Nevermind, apparently you fixed it already with the new provider here https://registry.terraform.io/v1/providers/ldcorentin/klayer
Let me know if it is correct assumption

The right provider to use is : `klayer`!

๐Ÿคฆโ€โ™‚๏ธ

Hey mate,
I'm glad you find the patched version !
I did the necessary to delete the klayers one but never had an answer from hashicorp. But after some research I'm not the only one in this situation...
I hope you'll enjoy the provider!

@ldcorentin Unfortunately could not make it work still.
Now I have the following error when try to init terraform:

Initializing provider plugins...
- terraform.io/builtin/terraform is built in to Terraform
- Finding hashicorp/aws versions matching "4.54.0"...
- Finding ldcorentin/klayer versions matching "1.0.1"...
- Finding mongodb/mongodbatlas versions matching "1.8.0"...
- Finding hashicorp/null versions matching "3.2.1"...
- Finding latest version of hashicorp/klayers...
- Finding hashicorp/archive versions matching "2.3.0"...
- Using previously-installed hashicorp/aws v4.54.0
- Installing ldcorentin/klayer v1.0.1...
- Installed ldcorentin/klayer v1.0.1 (self-signed, key ID 070C8B031EF9A7D1)
- Using previously-installed mongodb/mongodbatlas v1.8.0
- Using previously-installed hashicorp/null v3.2.1
- Using previously-installed hashicorp/archive v2.3.0

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
โ•ท
โ”‚ Error: Failed to query available provider packages
โ”‚ 
โ”‚ Could not retrieve the list of available versions for provider hashicorp/klayers: provider registry registry.terraform.io does not have a provider
โ”‚ named registry.terraform.io/hashicorp/klayers
โ”‚ 
โ”‚ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which
โ”‚ modules are currently depending on hashicorp/klayers, run the following command:
โ”‚     terraform providers
โ•ต

as you can see it tries to download hashicorp/klayers provider which obviously does not exist. Not sure where it takes this reference. So I gave up for now and hardcoded the layer arn which I needed.

maybe you have some insights why it could happen.
There is a result of terraform providers command:

โฏ terraform providers

Providers required by configuration:
.
โ”œโ”€โ”€ provider[registry.terraform.io/hashicorp/aws] 4.54.0
โ”œโ”€โ”€ provider[registry.terraform.io/ldcorentin/klayer] 1.0.1
โ”œโ”€โ”€ provider[registry.terraform.io/mongodb/mongodbatlas] 1.8.0
โ”œโ”€โ”€ provider[registry.terraform.io/hashicorp/null] 3.2.1
โ”œโ”€โ”€ provider[registry.terraform.io/hashicorp/archive] 2.3.0
โ”œโ”€โ”€ provider[registry.terraform.io/hashicorp/klayers] # <====== weird
โ””โ”€โ”€ provider[terraform.io/builtin/terraform]

@floydspace The issue here, is now that it tried to downloaded it once, terraform put the dependency in your state. In order to get rid of that problem, you have two solutions :

  • To modify the state directy and remove the hashicorp/klayers from it.
  • To use terraform cli : terraform state replace-provider hashicorp/klayers hashicorp/klayer