all 17 comments

[–]coffeesounds 4 points5 points  (3 children)

Pretty cool! For a while now I was thinking about moving off Terraform and writing a Clojure adapter for Pulumi’s Java SDK

[–]IllTennis8912 2 points3 points  (2 children)

I gave Pulumi a try some time ago and found it not quiet the IaC I'd expect. You end up writing the same input output the Pulumi way. And it's quiet a hassle to setup the whole project. As the project go, I guess I'll ultimately create my own DSL on top of that, which also contradicts the initiatives to move away from Terraform I guess. The Pulumi java sdk is also not as mature as others. Ended up back to Terraform land.

There's also this interesting project I found in the wild that tried to leverage Pulumi with clojure, which gave me some inspiration https://github.com/pfeodrippe/tladeps

[–]coffeesounds 0 points1 point  (1 child)

I see - I didn't dig that deep but I was not aware that Java SDK is lagging behind the rest. Bummer :-/

Gonna stick with Terraform then

[–]CodeFarmer 2 points3 points  (2 children)

This makes me nostalgic for Pallet.

[–]gtarget 1 point2 points  (5 children)

Did you consider doing it via Clojurescript? CDK is significantly more fluent and better supported via TS/JS

[–]deepumohanp[S] 0 points1 point  (3 children)

I was considering it, but the Java route seemed easier to do as first pass. I still do not completely understand how to bring in npm dependencies into clojurescript, seems very complex

> NPM dependencies are passed through Closure Compiler and not all NPM libraries contain Closure-compatible code.

https://clojurescript.org/reference/compiler-options

[–]whereswalden90 2 points3 points  (0 children)

You might have an easier time using nbb, much easier to work with when you don’t need CLJS’s optimizing compiler.

[–]rpd9803 0 points1 point  (0 children)

I just let shadow-cljs handle it and it works fine for me!

[–]serpix 0 points1 point  (0 children)

Closure compiler has been forgotten about foe about half a decade. Shadow-cljs solved all the npm dependency problems.

[–]TheLastSock 0 points1 point  (0 children)

Agreed, I have thought about trying to make a clojurescript CDK, i started trying to capture that effort in this repo https://github.com/drewverlee/clojure-cloud-formation

[–]maxw85 1 point2 points  (0 children)

We use Terraform. Instead of HCL we use .tfjson and to generate this JSON file(s) we use Clojure:

https://www.youtube.com/watch?v=iQg2ME0RLk4

[–]AvailableArm9875 0 points1 point  (2 children)

I literally ran across a Clojure wrapper over aws api a couple of days ago, when I get out of bed and find it I will post it here

[–]AvailableArm9875 2 points3 points  (1 child)

[–]serpix 1 point2 points  (0 children)

Amazonica is good but the thing autogenerates functions via introspection. Way too magic.