Serverless Camunda Terraform Recipe using Cloud Run and Cloud SQL

Tom Larkworthy
The Startup
Published in
3 min readApr 9, 2020

--

Here is a recipe to get the Camunda business workflow engine up-and-running fast using Terraform and serverless hosting technologies. Full code on Github

Persistence with Cloud SQL

Camunda requires a relational database. I used Google’s managed Cloud SQL. Hardly any ops required! I put Camunda in its own database namespace, so we can reuse the SQL service for other applications. I also provisioned a unique user, so we can track Camunda’s access uniquely.

Customizing the Camunda Docker Image With Cloud Build

Camanda very helpfully supplies a basic docker image, but we need to customize it. We will typically need to do this for two reasons. First, we need to supply a custom database driver to auto handle Google Cloud’s certificate rotations. Second, we need to load our Camanda runtime customization. For now, I just show you how to load the custom driver, but the approach extends to the second case that you will also probably need to do.

--

--

Tom Larkworthy
The Startup

Observablehq/Cloud consultant. Developing webcode.run to serverless to Observablehq. Ex-Firebase, Ex-Google Cloud.