I’m pretty new to Datomic Env, but I recently joined team and they don’t have any IaC. So I was wondering what’s the recommended approach.

Currently they using AWS MarketPlace subs, and spin-up Datomic with CF Template. As everyone else I guess.
I can see that CFT do a lot’s of stuff, but I don’t like some configs, for instance IP ranges for VPC, Subnets are too big.

I would like to Use Terraform, but I was not able to find any official plugin for Datomic.

So is there any way how to use Terraform to spin-up Datomic Enterprise Instance and build other stuff around?

I saw on the internet that someone is building wrapper around CF and then provide those values to TF.

Or is it possible to pre-bake custom AMI with Packer, but still use Enterprise version, we are interested in support options particularly.

Hi. Judging by your description, I suspect you’ve seen my approach. Perhaps a bit more context would be helpful about why we chose to wrap the CloudFormation stacks.

We considered replicating Cognitect’s CloudFormation templates in Terraform, but if you do that, you lose out on being able to immediately update the stack when Cognitect releases updated templates. Plus it’s a lot of work.

You can create the two stacks necessary for Datomic Cloud via Terraform with aws_cloudformation_stack (just like we do for query groups).

But if you’re spinning up a cluster for the first time, you have to manually go through the AWS Marketplace. We ended up just wrapping the stacks created through that initial process, but there’s no reason you couldn’t immediately delete those stacks and recreate via Terraform. It would probably make managing stack updates a bit smoother.

While it’s been a while since I’ve fired one up from scratch, I also believe you can configure your CIDR block and subnet ranges when you spin up the cluster.