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

Add module auto update and artifactory source type #81

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

Conversation

stobias123
Copy link

Addresses #79 + #80 :)

@minamijoyo
Copy link
Owner

Hi @stobias123, Thank you for working on this! Expanding support for 3rd-party registries would be a great addition!

Before moving to code review, could you explain the difference between the standard Terraform module registry and the Artifactory?

My naive understanding is that 3rd-party registries which implement the module registry protocol should work with the tfregistryModule source type. Why can’t we just set the BaseURL instead of adding a new specialized source type? Since the current implementation of the tfupdate assumes the standard registry only, I guess something is missing, which is why you are sending the patch. Because I’m unfamiliar with the Artifactory, an example of Terraform configuration using the Artifactory would also help me understand what is missing.

@stobias123
Copy link
Author

I'm a little embarrassed to say, I think you're actually right 😅 - just need to configure baseURL. I might've tunnel visioned a bit here.

I would just need to move this logic for detecting / setting the registry url into the main tfregistryModule source init here

@minamijoyo
Copy link
Owner

@stobias123 Thank you for your reply! I understand that the problem is detecting and setting the baseURL.

I looked in the official artfifactory documentation but couldn't find an actual example of Terraform configuration.
https://www.jfrog.com/confluence/display/JFROG/Terraform+Registry

I’m curious about what the module's source address looks like and how the Terraform core handles it, especially the /artifactory/api/terraform part. If my understanding is correct, the missing piece for supporting 3rd-party registries is the service discovery protocol.
https://developer.hashicorp.com/terraform/internals/remote-service-discovery

Do you have any public artifactory repository where I can inspect the API response?

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.

None yet

2 participants