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

Determine what protocols are supported #786

Closed
reneherrero opened this issue Aug 2, 2021 · 5 comments
Closed

Determine what protocols are supported #786

reneherrero opened this issue Aug 2, 2021 · 5 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@reneherrero
Copy link

reneherrero commented Aug 2, 2021

SDK version

github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.0

Use-cases

Provide a way to determine what protocols are supported (ex: 5.1) by the provider referencing this library.

This is a mandatory field introduced by the Provider Registry Protocol: https://www.terraform.io/docs/internals/provider-registry-protocol.html#response-properties-1

Attempted Solutions

  • Searched documentation
  • Searched in code
  • Google

Proposal

Not sure what's the best way to expose this info.

Putting the info in the README.md would seem like an easy first step.

References

N/A

@reneherrero reneherrero added the enhancement New feature or request label Aug 2, 2021
@juancsr
Copy link

juancsr commented Sep 2, 2021

I'm having the same issue, can anyone shed a light on this?

@bflad bflad added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jan 11, 2022
@bflad
Copy link
Contributor

bflad commented Jan 11, 2022

Hi @reneherrero 👋 Thank you for raising this.

Providers written in v2 of this framework are implemented using a protocol version 5.0 server (essentially requiring Terraform CLI 0.12+). Uploads to the public Terraform Registry default to this protocol version, unless a Terraform Registry manifest file is included with a different protocols value.

Will certainly keep this open to document this better.

@rene-at-dell
Copy link

Cool, thanks for the info @bflad

@bflad bflad added this to the v2.11.0 milestone Jan 12, 2022
@bflad
Copy link
Contributor

bflad commented Feb 17, 2022

As part of #857, newer SDK logging messages implemented via terraform-plugin-log will now include a structured logging key tf_proto_version with the value 5.2 for terraform-plugin-sdk/v2 providers. Any provider log entries that are also implemented via terraform-plugin-log going forward should also automatically include that information. Refer to the writing log output documentation for more information about using that logging functionality.

Formal documentation for Terraform plugin protocol versions in https://terraform.io/plugin will be introduced as part of hashicorp/terraform-plugin-mux#30. In particular, the terraform-plugin-sdk/v2 documentation will include this information at the top:

Terraform Plugin SDKv2 is an established way to develop Terraform Plugins on Protocol Version 5 (where "Protocol Version 5" is a link to a new section describing what that is).

Since I believe both of those should cover this, I'm going to close this out. Thanks again for raising this!

@bflad bflad closed this as completed Feb 17, 2022
@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 Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants