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: https://github.com/alidlo/infra.aws
This looks neat. While looking into Datomic Ions, I dabbled to make a yaml parser that understands the yaml tags for CFN intrinsics: https://github.com/portkey-cloud/cfn-yaml
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
Looks like there's also https://github.com/luchiniatwork/terra
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
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 https://github.com/brabster/crucible
Nice, I have to have seen that before but have forgotten it, or then I just had not ran into it, swiss cheese memory :)
@mruzekw cdk-clj seems really nice https://github.com/StediInc/cdk-clj
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.