Handling un-readable resource params

Hi there,

I’m in the process of adding a new resource to the existing Terraform provider for TeamCity.

The REST API for the resource in question has a “secure” param that can be set upon creation or updated, but can’t be read back.

What’s the best way to handle this in Terraform?
I’ve tried a few variations of DiffSuppress and CustomizeDiff functions, but can’t seem to find the correct combination.

Any pointers welcome.

Thanks in advance.


Hi @fatmcgav,

The typical answer to this has been for the Read function to ignore that particular attribute (leaving it unchanged) but to otherwise handle it in the same way everywhere else.

The result then is that Terraform won’t be able to detect upstream “drift” (something changed outside of Terraform) but it will othewise behave in the usual expected way, detecting if the configuration is different than the value that was written by the most recent Create or Update action.