I’m writing a custom provider and am facing an issue with
Maybe it comes from a misunderstanding on my side but i can’t explain why it behaves this way.
I have a TypeSet in my schema with a resource element.
Whatever i do, when terraform calculates a plan and calls the resource update function, i always receive a set with items that are initialized with default values for the underlying schema.
For instance, i have 6 elements in the set and i want to keep only 1. Terraform first reads the resource to refresh the state, the read returns the 6 elements, then it calls update with a set containing 2 elements (the item coming from the config, plus another item with everything initialized with default value).
I would expect that update receives a set containing only 1 element.
Am i missing something ? Is it how a TypeSet should behave ?