You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While terraform-provider-framework has not actually implemented UpgradeResourceState handling (refer to hashicorp/terraform-plugin-framework#42), there is currently a passthrough implementation there since the RPC is always invoked. When passing a framework provider through terraform-plugin-mux tf6to5server for Terraform CLI 0.12+ compatibility, there should be no errors either.
However, Terraform CLI 0.12 through 0.14 return the following (less than helpful) error:
Error: EOF
This is because those versions of Terraform CLI requires the Msgpack field to be populated. This would require converting from Response JSON (if provided) to MessagePack (if not provided). There may be possibility to also perform some legacy handling with the requests as well (e.g. converting flatmap to JSON), otherwise each wrapped server would also need to handle that data.
Attempted solutions
Considering a terraform-plugin-framework specific implementation, which wouldn't necessarily help the larger ecosystem when using this package with other tf6server implementations.
Proposal
In the tf6to5server implementation for UpgradeResourceState, check if UpgradedState only includes the JSON field. If so, convert it to MessagePack and send in the Msgpack field.
Thinking about this more, we should keep these Go packages as simple as possible and this functionality should be considered out of scope. Having this automatically handled may not be obvious that it exists here and it would be awkward to redirect folks to depending on this.
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.
terraform-plugin-mux version
Use cases
While terraform-provider-framework has not actually implemented
UpgradeResourceState
handling (refer to hashicorp/terraform-plugin-framework#42), there is currently a passthrough implementation there since the RPC is always invoked. When passing a framework provider through terraform-plugin-muxtf6to5server
for Terraform CLI 0.12+ compatibility, there should be no errors either.However, Terraform CLI 0.12 through 0.14 return the following (less than helpful) error:
This is because those versions of Terraform CLI requires the
Msgpack
field to be populated. This would require converting from Response JSON (if provided) to MessagePack (if not provided). There may be possibility to also perform some legacy handling with the requests as well (e.g. converting flatmap to JSON), otherwise each wrapped server would also need to handle that data.Attempted solutions
Considering a terraform-plugin-framework specific implementation, which wouldn't necessarily help the larger ecosystem when using this package with other
tf6server
implementations.Proposal
In the
tf6to5server
implementation forUpgradeResourceState
, check ifUpgradedState
only includes theJSON
field. If so, convert it to MessagePack and send in theMsgpack
field.References
The text was updated successfully, but these errors were encountered: