Hacker News new | ask | show | jobs
by nicobn 3609 days ago
Don't get me wrong, I love AWS. I use ~15 products almost everyday. I actually like how powerful IAM is.

But yeah, CloudFormation just sucks. It does. It's painful because it's a really good idea but the configuration format is inadequate for the task.

CF should have been implemented using a declarative DSL similar to Puppet from the start. I've been tinkering with the idea of creating a DSL with a JSON translation layer but I always assumed AWS would eventually move away from JSON anyway, making the effort futile. Four years later and still no improvements. Definitely my biggest disappointment with their platform.

4 comments

Am I insane, or are you and the commentators below unknowingly describing Terraform?

https://www.terraform.io/

I'm glad I'm not the only one who thought cloudformation was difficult.

Terraform is great so far. I am running into some duct-tape issues with resources shared between two terraformations, though.

You're not insane!
Plenty of those DSLs already exist, the cfer project[1] that I contribute to and SparkleFormation being two I can vouch for. I don't find CloudFormation particularly annoying or difficult, and certainly better than the alternatives (BOSH/Terraform/etc.), given such a wrapper, and cfn-init with CloudFormation metadata is miles ahead of "well, install Consul and connect to the cluster and eventually reach the state you want to be in" for my uses.

[1] - https://github.com/seanedwards/cfer

[2] - https://github.com/sparkleformation/sparkle_formation

I maintain a ruby dsl as well at http://github.com/bazaarvoice/cloudformation-ruby-dsl

The format is a weak argument against cloud formation. It has some negatives. This one is easily overcome.

And I salute you! We heavily use the Ruby DSL.
As already said, you should use terraform which has its own DSL (called HCL). Inspired by JSON but way simpler and more appropriate for this specific task.

Important tip: If you use one of jetbrains IDE (IntelliJ/PyCharm/...) there is a free plugin to handle terraform files.

It gives the usual syntax highlighting + auto completion of variables and devices + detection of errors. It's very very nice!

I have to state that configuration is not easy. CF might suck, but imagine something easily to replace it and works better is close to be wishful thinking.
Terraform