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

Merge tfmigrate-storage implementation into the tfmigrate repository #147

Merged
merged 21 commits into from
Aug 15, 2023

Conversation

minamijoyo
Copy link
Owner

@minamijoyo minamijoyo commented Aug 15, 2023

Closes #146

We have changed the license of the tfmigrate-storage repository to MIT in minamijoyo/tfmigrate-storage#4, so there is no longer a strong reason to keep the repository separate. Merge the repository for ease of development.

Merge it under storage/ directory using git subtree add to keep git history, adjust references, and fix lint issues etc.

$ git remote add storage ssh://git@github.com/minamijoyo/tfmigrate-storage
$ git subtree add --prefix=storage storage master

https://github.com/minamijoyo/tfmigrate-storage/tree/197930a00017e79ae1bc5d23140c102f9a7fcb6b

minamijoyo and others added 21 commits March 22, 2022 22:55
https://github.com/minamijoyo/tfmigrate/tree/49ea331bbf97b9effe3344428db52d0f29719800/storage

It's natural that tfmigrate users will expect to be authenticated cloud
providers with the same options and precedences as terraform backend.
This was not a problem in the s3 storage (I think) because the
authentication logic for AWS is implemented in an external library
hashicorp/aws-sdk-go-base. However, except for AWS, to expand support
for other history storage types, we need to reuse the upstream code.

The problem is that the license of hashicorp/terraform is the MPL2, but
the tfmigrate is currently distributed under the terms of MIT. Before
expanding support for other storage types, I'll split the storage
implementations into a new separate repository, which will be
distributed as the MPL2.
To extend support for other history storage types, relicense the storage
package from MIT to MPL 2.0 so that we can reuse the upstream
hashicorp/terraform implementations without license conflict.
The golangci/golangci-lint-action@v2 implicitly installs Go and its
version was recently upgraded to Go 1.18. It causes an issue for old
golangci-lint. To fix the problem either upgrading
golangci-lint-action@v3 and setup Go 1.17.x explicitly or updating
golangci-lint to the latest v1.45.2. I fixed both and also upgrading
some actions to the latest.
Update golangci-lint to v1.45.2 and actions to latest
Signed-off-by: Kengo TODA <skypencil+github@gmail.com>
Signed-off-by: Kengo TODA <skypencil+github@gmail.com>
Signed-off-by: Kengo TODA <skypencil+github@gmail.com>
Signed-off-by: Kengo TODA <skypencil+github@gmail.com>
Add a simple GCS storage impl
I originally wrote the local and s3 storage implementation for tfmigrate
as the MIT license. Next, someone sent me a patch for gcs storage
implementation #23, copied
from the upstream terraform backend implementation. I was concerned it
would violate the MPL2 license because the tfmigrate' license is MIT,
and terraform's is MPL2.

So I split the storage implementations
#80 into a separate
https://github.com/minamijoyo/tfmigrate-storage repository and
relicensed it as MPL2 so that someone could easily copy snippets from
the upstream. However, we could not contact that patch's author and the
initial patch was not merged finally.

Time passed, KengoTODA sent me another patch
minamijoyo/tfmigrate-storage#3 for gcs support
which contained minimal functionality and was not copied from upstream.
This patch has finally been accepted and merged.

That is, I've changed the license of the storage implementation with the
intention that it will contain a derivative work of terraform that can
be easily copied from terraform's backend implementation to extend
various storage types, but this has yet to happen. It's clearly far from
the terraform's implementation at the time of writing.

Recently, HashiCorp announced that it would change the license of its
products, including Terraform, from MPL2 to BSL1.1.
https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license

If, as I originally intended, we allow contributors to copy code from
upstream terraform, the tfmigrate-storage repository must also be
changed to BSL. This means that the tfmigrate source can continue to be
distributed as MIT, but the tfmigrate's binary will be bounded by BSL.
Even though HashiCorp's BSL is a reasonably permissive license with no
restrictions other than HashiCorp's competitors, it is no longer
open-source by OSI definition. I want to continue to keep tfmigrate as
an open-source project.

Technically, it is possible to keep the tfmigrate-storage repository as
MPL2. Still, I no longer have a solid reason to do so; it is just
inconvenient to have a separate repository.

Fortunately, KengoTODA and I are still the only contributors to the
tfmigrate-storage repository, and I got permission from KengoTODA to
re-license his patch as MIT in
#146.

So, I'm going to change the license of the tfmigrate-storage repository
to MIT and will merge it into the tfmigrate repository.
Change tfmigrate-storage license from MPL2 to MIT
git-subtree-dir: storage
git-subtree-mainline: 722f089
git-subtree-split: 197930a
@minamijoyo minamijoyo merged commit b59d65f into master Aug 15, 2023
@minamijoyo minamijoyo deleted the merge-tfmigrate-storage branch August 15, 2023 14:37
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.

Change tfmigrate-storage license from MPL2 to MIT
2 participants