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

tftypes: Surface Protocol Unknown Value Refinements #315

Open
bflad opened this issue Aug 2, 2023 · 0 comments
Open

tftypes: Surface Protocol Unknown Value Refinements #315

bflad opened this issue Aug 2, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bflad
Copy link
Contributor

bflad commented Aug 2, 2023

terraform-plugin-go version

v0.18.0

Use cases

Terraform 1.6 and later supports cty value refinements internally and as part of the MessagePack encoding of the value across the plugin protocol. This is done via MessagePack extension functionality as described in the plugin protocol object wire format documentation. This additional value encoding is safe today for existing implementations because extensions have always been considered an unknown value when decoding.

Example use cases:

  • For values from Terraform, provider developers will be able to use this functionality to perform configuration validation on partially unknown values.
  • For values to Terraform, provider developers will be able to use this functionality to signal partially unknown values, such as signaling that an unknown value will never be null.

Proposal

TBD.

Implementation notes:

  • To prevent breaking existing implementations, a partially unknown value must still be treated as wholly unknown. For example, the tftypes.Value type IsKnown() method should still return false for both wholly unknown and partially unknown values. Consumers will be required to check for partial unknown-ness, if desired, before current unknown checks.
  • MessagePack extension codes outside of 12 should remain treated as wholly unknown to account for other potential future enhancements to the protocol.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant