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

Upjet generated providers shouldn't use Terraform Providers as Go Modules #459

Open
rickard-von-essen opened this issue Jan 10, 2025 · 1 comment
Labels

Comments

@rickard-von-essen
Copy link
Contributor

Currently some Upjet generated providers (provider-upjet-gcp, provider-upjet-aws), but goes against HashiCorps policy:

Do Not Import Providers as Go Modules

Terraform's providers are written as Go packages, and they mostly use Go modules as their dependency management solution. This makes it tempting to import the provider as a dependency of your Go code, and to call its exposed interface. This is explicitly an unsupported way to interact with providers and provider maintainers make no guarantees around backwards compatibility or the continued functioning of code that does this.

https://developer.hashicorp.com/terraform/plugin/best-practices/interacting-with-providers#do-not-import-providers-as-go-modules

@rickard-von-essen rickard-von-essen added the bug Something isn't working label Jan 10, 2025
@mergenci mergenci added the v2 label Jan 10, 2025
@mergenci
Copy link
Member

Thanks for opening this issue @rickard-von-essen 🙏 I don't agree that Upjet-based providers shouldn't import Terraform providers, just because Terraform recommends against doing so. In big Upjet providers, we do so by paying the cost of making Terraform provider upgrades backwards compatible. The problem, however, is that Upjet doesn't offer an in-between alternative between using Terraform CLI and importing the providers. Currently, making a provider no-fork (free from Terraform CLI) is a rocky road. Hopefully, we can offer an alternative to those who would like to keep the maintenance cost low.

@mergenci mergenci removed the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants