Using PlanModifier to supress the diff causing plan diff for other computed fields

Hi Team,

We have an attribute of type string for which had a PlanModifer to make it’s value case-insensitive, after creating the resource, modified the value of the attribute, when terraform plan is made, there is a diff showing for other computed attributes and there is no diff for the current attribute which had PlanModifier.

Steps:

  1. Terraform apply (with description value as "hello plugin 1 ")
  2. Terraform plan (No diff is shown)
  3. Modified description to "HELLO plugin 1 "
  4. Terraform plan (shows diff for other computed attributes)

There is a PlanModifer for description attribute and because of it, there is no diff for this in plan but it is showing diff for all other computed and optional+computed fields.

In step 3 are you changing the value in a terraform config file (.tf), or on the API?

Thanks for checking this. Value is changed in .tf file. Once the value is changed, terraform plan is not showing diff for this value attribute but it’s showing diff for all other computed attributes as (known after apply).