Apps, Machines, Terraform... where should I start?

We’ve got some simple apps / postgres in v1 mode, but now I’m ready to set things up “for real”. I’ll need to add rabbit to phoenix and postgres.

I’d like to use terraform (Pulumi looks interesting as well) to configure environments. I’m using it for Auth0 and Cloudflare already. But it only focuses on Machines, and seems not to be a major focus of effort. But the demo walk throughs all talk about apps.

But… apparently apps use machines behind the scenes now.

So I’m confused as to where to invest my effort. I’ll have 3 or 4 environments, each with phoenix, postgres, and rabbit. And prod will be multi-data center.

Given that, what is the best balance of headache now as I understand you’re in the middle of a transition, vs headache later of migrating to whatever your future holds?

Near as I can tell, my options are:

  1. terraform machines: elixir and rabbit, flyctl: postgres
  2. terraform machines: rabbit, flyctl: elixir and postgres
  3. terraform cloudamqp: rabbit, flyctl: elixir and postgres

Then presumably I can use flyctl just to deploy new images either via machines or apps.

Thanks

1 Like