Skip to content

[Bug]: Module for v2 should include v2 #1865

Description

@yspotts

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

ProviderConfig

Resource MRs required to reproduce the bug

ProviderConfig

Steps to Reproduce

Try and create a Namespaced ProviderConfig via api

What happened?

We need to create a v2 aws ProviderConfig programmatically (i.e. in a controller we are building). We am trying to include the proper module and package for v2, and tried the following:

go get -u github.com/crossplane-contrib/provider-upjet-aws@v2.0.0

However, this yields the following error

go: github.com/crossplane-contrib/provider-upjet-aws@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/crossplane-contrib/provider-upjet-aws/v2")

This seems to be because of the module definition
https://github.com/crossplane-contrib/provider-upjet-aws/blob/v2.0.0/go.mod#L5

module github.com/upbound/provider-aws

whereas it should be

module github.com/upbound/provider-aws/v2

As an aside, any reason the module references upbound and not crossplane-contrib? This requires a replace directive.

Relevant Error Output Snippet

Crossplane Version

2.0.0

Provider Version

2.0.0

Kubernetes Version

No response

Kubernetes Distribution

No response

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions