launchdarkly / terraform-provider-launchdarkly

Terraform LaunchDarkly provider
https://www.terraform.io/docs/providers/launchdarkly/
Mozilla Public License 2.0
23 stars 24 forks source link

Repository should have v2 in the module name to be used #214

Closed sam-utila closed 5 months ago

sam-utila commented 5 months ago

And when trying without v2:

> go get github.com/launchdarkly/terraform-provider-launchdarkly@latest

go: downloading github.com/launchdarkly/terraform-provider-launchdarkly v1.7.1

And when trying with v2:

> go get github.com/launchdarkly/terraform-provider-launchdarkly/v2@latest

go: module github.com/launchdarkly/terraform-provider-launchdarkly@upgrade found (v1.7.1), but does not contain package github.com/launchdarkly/terraform-provider-launchdarkly/v2
sam-utila commented 5 months ago

I was able to import with:

replace github.com/launchdarkly/terraform-provider-launchdarkly => github.com/launchdarkly/terraform-provider-launchdarkly v1.7.2-0.20240614121433-250c3fe179d5

Where v1.7.2-0.20240614121433-250c3fe179d5 is actually the latest commit 250c3fe179d5

ldhenry commented 5 months ago

Hey @sam-utila, thanks for bringing this to our attention. We will work on getting a fix out in the next release.

ldhenry commented 5 months ago

Hey @sam-utila,

I audited a few other v2+ Terraform providers and they all seem to be in the same situation:

Given that we are following the convention established by Hashicorp I am hesitant to update the module version. With that being said, can you elaborate on what you are trying to do by using the LaunchDarkly Terraform provider as a dependency? Depending on what your goals are, our Go API client might be a better fit.

sam-utila commented 5 months ago

We created our own pulumi provider since the current one is deprecated.

However I managed to get over over the problem pretty easily using:

require ( github.com/launchdarkly/terraform-provider-launchdarkly v1.7.2-0.20240614121433-250c3fe179d5 )

By attaching the date + sha it grabs the v2 commit

So I would say it's a low prio for us.

See archived version: https://github.com/lbrlabs/pulumi-launchdarkly/blob/3100842321086d2b468f0ad98db16f054928113b/provider/go.mod#L11

Thanks!