Terraform 0.11.14 - AWS IAM Policy Size

Working in a multi account ecosystem, we need to deploy global deny policies to all accounts. We are up against a problem where the size of the policy is too large. We’d like to cut down on newlines that Terraform inserts as to avoid this (before we trim our policy itself if needed).

What options are there for trimming policy definitions of “newlines etc” ? I could not find any info apart from the string utils you can use within the definitions themselves.

I was hoping terraform fmt had options to remove excess chars, but that is a dead end. Thanks in advance.