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

Add support for plugin protocol v6 #71

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

mildwonkey
Copy link
Contributor

This PR adds a new package, tfprotov6. It is mostly copy-pasted from tfprotov5. The interesting changes (besides just swapping 5 for 6 in imports everywhere) is the new tfprotov6/internal/tfplugin6/tfplugin6.proto file, taken directly from terraform's main branch, an assortment of renamed functions (ValidateResourceTypeConfig is now ValidateResourceConfig, etc - all the changes we discussed internally), and finally the interesting one, the new NestedType field inside an Attribute (with associated conversions in toproto and fromproto).

If you want to see any of this in action, I have a very tiny implementation of the random provider with this branch vendored: https://github.com/mildwonkey/terraform-provider-random

I also have a fork of ptyng's sql provider using this; it works as a provider just fine but I'm still struggling with the acceptance tests, which required changes to the sdkv2. I'll keep poking at that; it'd be nice to show off a provider using these new features with working tests.

@paddycarver paddycarver added the enhancement New feature or request label Apr 12, 2021
@paddycarver paddycarver self-requested a review April 12, 2021 23:18
Copy link
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, as future work, we're going to want to refactor the JSON/MsgPack encoding out of the protocol-versioned packages and into tftypes, so we don't need to keep implementing them for each new protocol version, but I don't think it's reasonable to lump that in with this PR.

LGTM. 👍 Thanks!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 May 28, 2024
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 this pull request may close these issues.

2 participants