Recently, one of my customers requested that I create some Terraform-based automation to help them deploy several (AWS) VPC Endpoint definitions into their accounts. This customer maintains a set of cloud-hosted environments for development, integration, testing and production activities. This meant that I was going to have to write things in a way that was going to be flexible enough to be repeatably-excecuted across all their environments.
Further, when I asked the customer for a specific list of services they wanted endpoints created for, the response I got back was basically, "all of them?". Previously, the customer had been creating per-service automation as they needed it. So, they already had redundant code that could have been refactored to use iterations rather than repeated chunks of all-but-identical code. Given that there's, like, four dozen VPC endpoint services that can be configured, I especially didn't want to go down their prior "copy the existing code to a new block and edit one string" met