Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project to use a valid Go module name (terraform-provider-macaddress -> github.com/ivoronin/..) #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ddelnano
Copy link

@ddelnano ddelnano commented Jan 10, 2024

Summary: Update project to use a valid Go module name (terraform-provider-macaddress -> github.com/ivoronin/terraform-provider-macaddress)

I am the maintainer for the terrform-provider-xenorchestra project and the end users of this project often pair our terraform providers together (VMs sometimes need a parameterized mac address). Unfortunately the xenorchestra provider has a bug where the intermediate state of a macaddress resource's output causes a crash (vatesfr/terraform-provider-xenorchestra#191, vatesfr/terraform-provider-xenorchestra#236). In order to address this bug, I wanted to embed this terraform provider into the xenorchestra acceptance test suite to verify the issue was fixed (see vatesfr/terraform-provider-xenorchestra#288).

In order to accomplish this, I had to fork your project and change the module name to include a domain prefix to avoid the error seen below:

ddelnano@ddelnano-desktop:~/code/terraform-provider-xenorchestra (master) $ git diff
diff --git a/go.mod b/go.mod
index eb90974..8f3397d 100644
--- a/go.mod
+++ b/go.mod
@@ -76,3 +76,4 @@ require (
 )

 replace github.com/ddelnano/terraform-provider-xenorchestra/client => ./client
+replace github.com/ivoronin/terraform-provider-macaddress v0.3.2 => terraform-provider-macaddress v0.3.2

ddelnano@ddelnano-desktop:~/code/terraform-provider-xenorchestra (master) $ go get github.com/ivoronin/terraform-provider-macaddress
go: github.com/ivoronin/terraform-provider-macaddress: malformed module path "terraform-provider-macaddress": missing dot in first path element

This change upstreams what I made in my fork to facilitate vatesfr/terraform-provider-xenorchestra#288.

Test plan: Existing acceptance tests pass and changes are consistent with my working fork

ddelnano@ddelnano-desktop:~/code/terraform-provider-macaddress (ddelnano/update-projects-module-name-to-be-valid) $ TF_ACC=1 go test ./... -v
?       github.com/ivoronin/terraform-provider-macaddress       [no test files]
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccMacAddress
--- PASS: TestAccMacAddress (2.01s)
PASS
ok      github.com/ivoronin/terraform-provider-macaddress/macaddress    2.019s

Also wanted to say thank you for your work on this project! I pair it with my xenorchestra terraform as well :)

@ddelnano ddelnano changed the title Update project to use a valid Go module name (terraform-provider-macaddress -> github.com/ivoronin/..) Update project to use a valid Go module name (terraform-provider-macaddress -> github.com/ivoronin/..) Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant