terraform-plugin-framework icon indicating copy to clipboard operation
terraform-plugin-framework copied to clipboard

Reexamine where we convert from Terraform values into `attr.Value`s.

Open paddycarver opened this issue 4 years ago • 1 comments

Currently, the framework is following a model of keeping everything as a tftypes.Value all the way through the framework, until the config, state, or plan tries to retrieve it, then converts back from an attr.Value into a tftypes.Value when setting the config, state, or plan. That means that for all the framework code, we're more likely to be using the tftypes.Value abstraction than the attr.Value abstraction provider developers are using and expect.

I'm suspicious that we can clean up a lot of code, handle a lot of edge cases, and make more things work intuitively the way provider developers expect if we instead convert from tftypes.Values into attr.Values when handling protocol requests, and then passing around the attr.Values.

paddycarver avatar Sep 21 '21 11:09 paddycarver

I think this pairs well with https://github.com/hashicorp/terraform-plugin-framework/issues/215 👍

bflad avatar Nov 02 '21 19:11 bflad

Created bespoke issues for tracking specific pieces of framework updates:

  • #588
  • #589
  • #590

If there are other places which need updates, we can create other new issues.

bflad avatar Dec 16 '22 16:12 bflad

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[bot] avatar Jan 16 '23 02:01 github-actions[bot]