The elasticache API on AWS is strict about the length of the string it receives for a "cache cluster identifier":
"The parameter CacheClusterIdentifier is not a valid identifier because it is longer than 20 characters."
I have hacked around this a few times, but now I would like to put in place a more reasonable solution for this issue in my code, and I believe the most straightforward would be to simply limit the length of the string I pass into that parameter.
If I have a string that is 30 characters, and need to limit it to 20 characters, what is the way to do this in Terraform?