We are using terraform 1.3.0 and terraform plugin frameowrk 0.10.0 for our provider development. We have a resource which gets created with some default attributes. We have modeled this parameter of the resource as a list of objects.
Since this is an Optional parameter and the current version of terraform plugin framework has an issue of “Unhandled Null Value” in using ListNestedAttributes, we had to use tftypes to model this parameter in the resource schema as a workaround. The schema of this parameter is as follows,
Once the resource is created, any parameter in any of these attributes can be updated except Id. When writing config to update these attributes, we found that if we send only those attribute objects which needs a change, terraform plan assumes that all the other attributes have to be overwritten with these changed attributes. These attribute objects are in order of few thousands and hence it is impossible to provide all of these attributes manually in the configuration.
As a workaround, we are creating a data source of this resource and providing the attributes from this data source as an input in the resource block.
But this is not helping us in sending a list of changed attributes.
Could somebody help us on how to create a delta of these attributes and send it in config so that terraform plan can consider it as delta and trigger an update to the provider.