Turning our snowflake infrastructure into an autoscaling fleet via a packer + terraform pipeline was one of my first projects at Buildkite back in 2016:
https://buildkite.com/resources/blog/terraform-techniques-wi...
We still have this pipeline with terraform, but have moved from building packer images for ec2 to building containers for ecs.