Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Understanding the relationship between OpenTF and registry.terraform.io #24

Closed
skyzyx opened this issue Aug 29, 2023 · 9 comments
Closed

Comments

@skyzyx
Copy link

skyzyx commented Aug 29, 2023

The FAQ says (emphasis mine):

Will I be able to use OpenTF as a drop-in replacement for legacy Terraform?
Yes

Will OpenTF work with all the providers and modules Terraform works with?
Yes

Will OpenTF be compatible with future Terraform releases?
OpenTF will be 100% interoperable with future Terraform releases until the community wishes otherwise.

A few questions that I have not seen answered yet:

  • Will there be a version of https://registry.terraform.io for OpenTF?

  • In cases where there are compat/interop behavioral bugs, is the intent to change OpenTF behavior to more closely match Terraform behavior?

  • If compat/interop with Terraform changes intentionally in the future, are there any ideas about how to handle the divergence? (Hoping to generally avoid what AWS did with OpenSearch.)

@Magnitus-
Copy link

Magnitus- commented Aug 29, 2023

I would assume given the expressed desire to remain compatible with Terraform Cloud, this will also imply the Terraform registry as well.

It seems like there is a well documented protocol for it actually so that should hopefully make it easier: https://developer.hashicorp.com/terraform/registry/api-docs

@cube2222
Copy link
Collaborator

cube2222 commented Aug 30, 2023

Hey @skyzyx, excellent questions!

Will there be a version of https://registry.terraform.io/ for OpenTF?

There's no final decision on this yet, so "possibly". It will remain compatible with the existing public registry.

In cases where there are compat/interop behavioral bugs, is the intent to change OpenTF behavior to more closely match Terraform behavior?

Yes

If compat/interop with Terraform changes intentionally in the future, are there any ideas about how to handle the divergence? (Hoping to generally avoid what AWS did with OpenSearch.)

We aim to add features on top of the Terraform feature-set, but those will be opt in. Generally, we aim to be 100% backwards compatible with Terraform. We've not been spending too much time on the details of handling a possible point in the future where the community might decide it's time to diverge, as that's very far off. It will definitely be extensively discussed prior to happening.

@javierruizjimenez
Copy link

javierruizjimenez commented Aug 30, 2023

The Terraform Registry Terms of Service have been updated changing:

(As identified by @osterman)

Before:

http://web.archive.org/web/20221220134052/https://registry.terraform.io/terms

You may download or copy the Content (and other items displayed on the Services for download) for personal non-commercial use only, provided that you maintain all copyright and other notices contained in such Content. You shall not store any significant portion of any Content in any form.

Now:

https://registry.terraform.io/terms

You may download providers, modules, policy libraries and/or other Services or Content from this website solely for use with, or in support of, HashiCorp Terraform. You may download or copy the Content (and other items displayed on the Services for download) for personal non-commercial use only, provided that you maintain all copyright and other notices contained in such Content. You shall not store any significant portion of any Content in any form.

--
Change date was not updaded: (Last updated: April 16, 2020)

@cube2222
Copy link
Collaborator

cube2222 commented Aug 30, 2023

Hey @javierruizjimenez! Thanks for adding it to this issue. We're aware and working on the best solution for this.

Our aim is for OpenTF to stay a drop-in replacement so that you don't have to do any changes to your tf code.

@ashald
Copy link

ashald commented Aug 31, 2023

FWIW, a while ago I created an MIT-licensed OSS project para to manage terraform plugins. If I recall correctly, this was out even before Terraform Registry (TFR) was GA.

The idea behind para is to provide greater control over package indices, as well as an option to maintain personal or fully local indices. What it means is that one can use a Github repo to build out a community repo, or each plugin maintainer can provider their own feed which can be referenced on per-project basis.

I'd imagine that unless there is way to make things working with TFR [without violating licenses], para can be used as an alternative, or can inspire plugin management system to be built within OpenTF.

I haven't used Terraform for a while so IDK if HashiCorp broke the interface used by para (in which case it should be easy to fix para, or extend OpenTF to provide a new and more convenient integration interface fir plugin management).

P.S.: I used FUSE in para to inject TF-compatible file structures and plugin contents in runtime to avoid need for extra configuration, but in retrospective a FUSE-less mode powered by an additional config file to pre-load plugins would've been a great addition. This one you would only need to invoke para once to rebuild TF plugin dir whenever you need to change/update plugin versions, rather than on every invocation.

P.P.S.: Pun intended in a form of "para-terraform," as in:

Paraterraforming involves the construction of a habitable enclosure on a planet which eventually grows to encompass most of the planet's usable area.

@cube2222
Copy link
Collaborator

cube2222 commented Aug 31, 2023

Hey @ashald! Thanks for weighing in!

We too have a bunch of registry implementations (afaik all three of Spacelift, Env0, and Scalr have their offerings for this) so that's not too much of an issue.

Generally, the hosting or building of a protocol-compatible registry isn't the hard part here, it's remaining a drop-in replacement so all providers and modules are available.

An interesting bit is that all providers and modules other than Hashicorp's are hosted on GitHub and the registry is just a "redirector". We're doing something similar, other than some special handling for Hashicorp's providers, so that all those providers and modules are still available.

@morsik
Copy link

morsik commented Sep 1, 2023

Guys... @javierruizjimenez and everyone else, I just wanted to point out, that both new and previous versions of ToS contains this:

You may download or copy the Content (and other items displayed on the Services for download) for personal non-commercial use only

Now... who honestly can tell that you used all of that stuff from registry.terraform.io only for personal use, and not for your work? :D


I've not been spending too much time on the details of handling a possible point in the future where the community might decide it's time to diverge, as that's very far off

@cube2222: The time to diverge may be a lot faster with those changes HashiCorp makes now...

@blaggacao
Copy link

blaggacao commented Sep 1, 2023

Company hereby is and shall be granted a nonexclusive, worldwide, royaltyfree, perpetual, irrevocable, sublicenseable and transferable right to fully exploit such User Submissions [providers, modules, ...]

Link to hightlighted terms 01.09.2023

A extreme interpretation would allow for HC to not link to the source in their registry's copy as they choose to, which could make it harder to discover the source that is still licensed according to the author's choosing, e.g. with an OSS license.

@roni-frantchi
Copy link
Collaborator

Hey everyone thanks a lot for weighing in here! ❤️
We're cleaning up this repo as OpenTF's repo is now available.

You're all very welcome to resume this discussion in opentofu/opentofu#258

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants