Upgrade terraform-plugin-framework to v0.16.0
#53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR upgrades the
terraform-plugin-frameworkdependency from v0.10.0 to v0.16.0.There was a fairly major change to the
typespackage in v0.16.0, in which they made the majority of values immutable, and theValue,Null, andUnknownfields unexported.This is particularly awkward for our generated
Copy*ToTerraformmethods which would previously mutate the given object's attributes directly, but now need to construct new objects.User-facing changes
Copy*ToTerraformmethod signatureBefore:
After:
Custom type
CopyTo*method signatureBefore:
After:
Configuration changes
The
time_typeandduration_typestanzas now require three new options:value_from_method- the method that will be called on anattr.Valueto get the value for the protobuf structvalue_to_method- the (package-qualified) method that will be called to construct anattr.Valuefrom the protobuf struct valuenull_value_method- the (package-qualified) method that will be called to construct a nullattr.ValueThe
injected_fieldsstanzas now require avalue_methodoption, which is the (package-qualified) method that will be called to construct the value of the injected field, when it is not already set.