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

Terraform protocol v6 support #737

Closed
paddycarver opened this issue Apr 13, 2021 · 2 comments · Fixed by #761
Closed

Terraform protocol v6 support #737

paddycarver opened this issue Apr 13, 2021 · 2 comments · Fixed by #761
Assignees
Labels
enhancement New feature or request

Comments

@paddycarver
Copy link
Contributor

With the merging of hashicorp/terraform-plugin-go#71, we now have a way to support version 6 of the Terraform protocol in the SDK. This issue is to track us doing that.

Open questions:

  • Should we migrate everything onto proto6?
  • Should we make Serve serve both 5 and 6?
  • Should we surface proto6 features in the SDK?
  • Should we add support for proto6 providers in helper/resource, which is how plugin-go providers are tested at the moment?

If we just upgrade from tfprotov5 to tfprotov6 and don't continue to support v5, we lose support for versions of Terraform below 0.15. This is probably a non-starter.

If we make plugin.Serve offer both 5 and 6, potentially by just upgrading requests over 5 to requests over 6 transparently, we can serve 6 for Terraform 0.15 and higher, and 5 for everything else.

If we surface proto6 features in the SDK, that mainly means supporting NestedType for attributes, letting them be used in lieu of blocks. Seeing as attributes and blocks are not cleanly surfaced, I'm not keen to open that can of worms right now.

I think we could add a ProtoV6ProviderFactories property to the resource.TestCase struct, like we added ProtoV5ProviderFactories, and that would give us test support for proto6 providers.

@paddycarver
Copy link
Contributor Author

We have decided that:

  • We will not be migrating providers built on SDKv2 to protocol v6 automatically, as that would drop support for Terraform versions below 0.15, which we're not going to do today.
  • Serve will therefore continue to only serve protocol 5. Protocol version 6 providers already have server.Serve to serve their providers, the SDK plugin.Serve function would only make sense to update if the SDK were going to use protov6.
  • We will not be surfacing protov6 features in the SDK, therefore.
  • We will be adding support for protov6 providers to helper/resource. TestCase will get a ProtoV6ProviderFactories property, similar to the ProtoV5ProviderFactories property.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants