aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
mruzekw 2020-05-18T20:43:57.212100Z

Is there a Terraform or CloudFormation of Clojure for AWS?

mruzekw 2020-05-18T20:44:17.212600Z

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

alidlorenzo 2020-05-18T22:15:54.213300Z

@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

👍 1
💯 1
viesti 2020-05-19T11:02:04.218300Z

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

viesti 2020-05-19T11:03:46.218600Z

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

viesti 2020-05-19T11:04:30.218800Z

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

alidlorenzo 2020-05-19T18:40:39.232Z

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

mruzekw 2020-05-19T22:38:03.235100Z

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

mruzekw 2020-05-19T22:42:43.235300Z

Looks like there's also https://github.com/luchiniatwork/terra

alidlorenzo 2020-05-19T22:50:54.235700Z

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

👍 1
viesti 2020-05-20T15:58:28.236200Z

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 😄

mruzekw 2020-05-21T04:47:10.236700Z

Found this for writing Cloudformation templates https://github.com/brabster/crucible

viesti 2020-05-21T12:46:28.237Z

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

🙂 1
ghadi 2020-05-18T22:20:42.213900Z

@mruzekw cdk-clj seems really nice https://github.com/StediInc/cdk-clj

👍 3
ghadi 2020-05-18T22:20:53.214300Z

there was a nice talk about it at the Conj

alidlorenzo 2020-05-18T22:22:48.215700Z

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

ghadi 2020-05-18T22:28:41.216200Z

Oh, didn’t realize.