hashicorp / terraform-plugin-go

A low-level Go binding for the Terraform protocol for integrations to be built on top of.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tfprotov5: Document Terraform 0.12-14 Requirement for UpgradeResourceStateResponse.UpgradedState.Msgpack

bflad opened this issue · comments

Does this documenation exist?

  • This is new documentation
  • This is an enhancement to existing documentation

Where would you expect to find this documentation?

  • On terraform.io
  • In the GoDoc for this module
  • In this repo as a markdown file
  • Somewhere else

Description

When running a protocol version 5 server via tf5server (or via tf6to5server), Terraform CLI 0.12 through 0.14 return an error such as:

    provider_test.go:11: Step 1/1 error: Error running post-apply plan: exit status 1
        
        Error: EOF

(Yes, that's it.) If UpgradeResourceState.Response.UpgradedState has the JSON field, but not Msgpack. We should document this requirement in the protocol version 5 definition and/or UpgradeResourceStateResponse type.

Discovered because terraform-plugin-framework only passes through the JSON field and ignores the Msgpack in its placeholder UpgradeResourceState handling.

References