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

Approach for replicating releases of providers (especially Official providers) #145

Closed
joe-a-t opened this issue Jan 4, 2024 · 2 comments
Labels
question Further information is requested

Comments

@joe-a-t
Copy link

joe-a-t commented Jan 4, 2024

Thank you for reporting an issue.

What is the approach that OpenTofu is taking for how new releases of the Official Terraform providers will be replicated to the OpenTofu registry? Will OpenTofu set up some kind of automation pointing at the GitHub repos for those providers that upon the publishing of a new official release to the HashiCorp registry will then replicate the relevant artifacts from GitHub (if they exist - if not might need to build the relevant artifacts from the source code then upload them) to the OpenTofu registry within X time frame? I'm presuming here that due to the HashiCorp registry TOS change, OpenTofu will be unable to simply replicate the built artifacts from the HashiCorp registry directly to the OpenTofu registry.

For the partner and community providers, will OpenTofu take the same approach or will partner and community providers be encouraged to modify their existing release processes to publish directly to the OpenTofu registry as part of their release process? I'm also presuming that HashiCorp would not allow the official providers which they control to publish directly to OpenTofu registry as part of their release processes (although who knows since I know Google employees - not HashiCorp - are the maintainers of the Official Google provider so unclear how much control HashiCorp really has over all of the Official providers).

Will OpenTofu have its own provider docs site (eg https://registry.terraform.io/browse/providers with documentation on each provider) or should people continue to use the main Terraform registry for that documentation viewing?

Please flesh out the Does OpenTofu work with all the providers Terraform works with? question on https://opentofu.org/faq/, https://opentofu.org/registry/, and the documentation in this repo with these kinds of details.

OpenTofu Version

N/A

OpenTofu Configuration Files

N/A

@joe-a-t joe-a-t added the bug Something isn't working label Jan 4, 2024
@Yantrio
Copy link
Member

Yantrio commented Jan 4, 2024

Hi @joe-a-t ! Thanks for raising this, hopefully I can answer all of these questions here for you now.

What is the approach that OpenTofu is taking for how new releases of the Official Terraform providers will be replicated to the OpenTofu registry?

Opentofu has forked all of the official terraform providers, solely with the purpose of using the repo to build the artifacts. Hashicorp does not currently expose the artifacts as github releases.

This process is fully automated and has been working for a few months now. You can see an example of this here: https://github.com/opentofu/terraform-provider-aws

Our registry implementation then understands that any of the hashicorp/* providers, are redirected to those built by us (but still the same source code as what's deployed by hashicorp).

Will OpenTofu set up some kind of automation pointing at the GitHub repos for those providers that upon the publishing of a new official release to the HashiCorp registry will then replicate the relevant artifacts from GitHub (if they exist - if not might need to build the relevant artifacts from the source code then upload them) to the OpenTofu registry within X time frame?

Yes, we currently have these repos staying in sync with github actions. This is the one single change that we make to each provider repository and you can see what we're running by looking at the commits. For example: hashicorp/terraform-provider-aws@3b706eb

For an overview: We are syncing hourly.

For the partner and community providers, will OpenTofu take the same approach or will partner and community providers be encouraged to modify their existing release processes to publish directly to the OpenTofu registry as part of their release process?

Right now, we have scoured github for all publically available providers and modules, and populated our registry with the details of those. The metadata that powers our registry can be found at https://github.com/opentofu/registry . It is also here where any new providers, modules or gpg keys can be uploaded.

Because we did not want to require every provider and module author to re-add their providers in 2 locations, we did this initial population a little while back and ask people only to add their new providers and modules to the registry. There is more information about how people can do this in the README of the repo, and we shall be updating the website with more information soon too!

Will OpenTofu have its own provider docs site

This is currently planned and on our roadmap, but due to limited resources right we've chosen to focus on other areas first as the documentation that is availble online and in each repository can be consumed very well right now.

Please flesh out the Does OpenTofu work with all the providers Terraform works with? question on https://opentofu.org/faq/, https://opentofu.org/registry/, and the documentation in this repo with these kinds of details.

I fully agree that our documentation and messaging here should be much more easily discoverable, and I'll ensure that we get things done as soon as possible for this.

Hopefully this answers all your questions, and if you have any more please feel free to add them here, or reach out to us on slack.

@Yantrio Yantrio added question Further information is requested and removed bug Something isn't working labels Jan 4, 2024
@joe-a-t
Copy link
Author

joe-a-t commented Jan 4, 2024

Great, thank you very much. That all makes sense and sounds good. It looks like you've even got the google and google-beta unique use case handled. Feel free to tag me for review on any of the documentation updates, I will leave this issue open until those changes have been made but feel free to close this with a link to the new issue(s) if you want to track those elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants