Hey everyone! I am finishing the migration of a terraform provider, and one thing that it supported is the Policy for AWS Channels. When read, the policy comes back with whitespace changes, which crashes the provider. Is there a version of DiffSuppressFunc: or something of sorts that can ignore whitespace changes??
Happy to provide any code that is needed!
Thank you in advance!
whitespace changes, which crashes the provider
Well that’s alarming, and sounds like it should be solved independently of “whitespace leads to config churn”, which I assumed this question was about.
Is the policy JSON? If so, this might have exactly what you’re looking for.
If not, you could implement a custom string type of your own which does the right thing when the strings are semantically equal.