e-breuninger / terraform-provider-netbox

Terraform provider to interact with Netbox
https://registry.terraform.io/providers/e-breuninger/netbox/latest/docs
Mozilla Public License 2.0
189 stars 133 forks source link

should be v0 or v1, not v3 #644

Open masikrus opened 1 month ago

masikrus commented 1 month ago

i need create pulumi provider

when i gen v3.9.1 i got error

$ go mod tidy go: errors parsing go.mod: go.mod:8:2: require github.com/e-breuninger/terraform-provider-netbox: version "v3.9.1" invalid: should be v0 or v1, not v3

how fix that?

FlxPeters commented 1 month ago

Can you provide a bit more context? Doesn't sound like a problem with the provider. More like a pulumi issue.

Ikke commented 1 month ago

This is related to how go expect versions to work. Go expects modules that have a version of v2 or higher to have that explicitly declared in their module path (eg. github.com/e-breuninger/terraform-provider-netbox/v3 in this case`).

When you build a binary, this does not matter, but when you try to include a package into a another module, go will complain if it does not adhere to that scheme.

masikrus commented 1 month ago

I don't know GO very well and yes I need to include the 3rd version module in the code can I somehow get around this error?

masikrus commented 1 month ago

so how i can use this provider?

module github.com/hbjydev/pulumi-netbox/provider

go 1.21

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220824175045-450992f2f5b9

require (
    github.com/sempervictus/terraform-provider-netbox v3.9.2
    github.com/pulumi/pulumi-terraform-bridge/v3 v3.28.1
    github.com/pulumi/pulumi/sdk/v3 v3.38.0
)

i try update this pulumi provider https://github.com/hbjydev/pulumi-netbox/