Fork me on GitHub

Is there a Terraform or CloudFormation of Clojure for AWS?


I'm mainly thinking about the declarative nature of both, just with EDN


@mruzekw As far as I know there isn’t any Clojure alternative to Terraform or Pulumi. I think many people just stick with json/yaml cloudformation templates. What I ended up doing is configuring cloudformation templates in EDN and wrapping Cognitect’s aws-api so that I could make requests to it via the repl (works well enough for me now and better than using aws console but YMMV) the repo is public in case you’d like to use/reference it:

👍 4
💯 4

This looks neat. While looking into Datomic Ions, I dabbled to make a yaml parser that understands the yaml tags for CFN intrinsics:


where this came from was that I could create API GW routes for the ions that are found in the resources/datomic/ion-config.edn


I wanted to use the ion-config.edn as "source of truth", but had some yaml obstacles on the way, this kind of escalated 🙂


what were the obstacles? I found that the aws-api made it easy to make* cloudformation requests, so as long as you don’t create some complex dsl, it’s just converting edn to json plus, reader literals make it easy to create some useful utilities that would have been otherwise difficult to do in json/yaml


Wait, does aws-api create CloudFormation templates? I thought it was all imperative calls, albeit defined in a edn interface


oh I meant make* cloudformation requests, not create. so you can configure templates in edn and then pass the options to :cloudformation client but as some others have mentioned might be less trouble using more robust code-as-infrastructure solution such as Pulumi

👍 4

maybe no real obstacle other than that I wanted to generate yaml, not json, in order to compare to CFN yaml templates I was using as an example. This offered a sidetrack for looking into yaml spec 😄


Found this for writing Cloudformation templates


Nice, I have to have seen that before but have forgotten it, or then I just had not ran into it, swiss cheese memory :)

🙂 4

there was a nice talk about it at the Conj


the repo says they’re discontinuing maintenance in favor of using aws’s typescript sdk which is why i didn’t recommend it nor consider it myself as a viable option


Oh, didn’t realize.