at my company we are using AWS Cloudformation to manage our infrastructure. The templates are written in JSON. The problem is that the templates are getting bigger by the day 5k Lines. Company policy is to write certain projects in one template (i.e. I'm not able to divide up the code into separate templates). And as a result the templates are getting really huge.
I've been playing with yaml, json and cloudformation generators. I found some nice yaml generator (Spiff). Using it I can reduce our templates by almost 90% in some cases.
Do you think that it is a good idea to generate cloudformation Templates on the fly and work mainly with Spiff yaml generators? Or there will be a dire cost that I'll pay within the next couple of months. Please keep in mind that Spiff is a bit cryptic and not pure Yaml, so there's a learning curve for people maintaining the templates after me.
What do you think?