Hello,
I am developing a new provider using the latest framework development. This provider creates a resource with content in JSON schema format. I have completed implementing all the methods, and they are functioning as expected. However, the read method is detecting differences between the file used to create the resource and the resource’s state content.
The differences identified by the Terraform plan are semantic in nature. I resolved this issue using a specific SDK function. Nevertheless, I am unsure about how to achieve the same result in the new framework. According to my research, I need to utilize Plan Modifiers and Custom Types, but I require guidance on how to implement them effectively.
"schema": {
Type: schema.TypeString,
Required: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
newJSON, _ := structure.NormalizeJsonString(new)
oldJSON, _ := structure.NormalizeJsonString(old)
return newJSON == oldJSON