Case Studies

How epilot Reduced Terraform Provider Creation and Maintenance Cost by 8X

Nolan Sullivan

Nolan Sullivan

June 27, 2023

Featured blog post image

How epilot Reduced Terraform Provider Creation and Maintenance Cost by 8X


  • ✅ 8X reduction in expected cost ($220K cost saving)
  • ✅ New APIs available in your provider within hours of going live
  • ✅ Create powerful new way to access existing API, in just a few weeks
  • ✅ No need to hire new, dedicated team just to maintain Terraform provider
  • ✅ Terraform provider created from existing OpenAPI specification: minimal learning curve

The Challenge: Sustainably Building Terraform Providers

epilot is the all-in-one ecommerce solution for companies in the energy industry.

Prior to Speakeasy, epilot’s Solutions Engineering team needed to work with each customer manually to set up their epilot instance.

Viljami Kuosmanen, epilot’s Head of Engineering, realized that epilot setup could be automated via their existing APIs, and that a language for configuring infrastructure already existed — Terraform.

The only piece they were missing was a Terraform provider. Terraform providers allow Terraform code to interact with an API. In epilot’s case, they could create Terraform configuration files that communicate with the epilot Terraform provider (and ultimately, the epilot API), to automate the setup/configuration process. This would make setting up a new customer in epilot as easy as running a single command.

Workflow diagram showing Speakeasy's terraform generation

Viljami recognized that building an entire suite of Terraform providers would require significant creation and maintenance cost however: in fact, their initial budget estimate was $250K per year to hire a dedicated team of Go engineers.

The Solution: OpenAPI-based Terraform Generation with Speakeasy

epilot are huge advocates of the OpenAPI framework (opens in a new tab). Viljami himself is the maintainer of several OpenAPI-based tools such as the OpenAPI backend (opens in a new tab) project.

Internally, the epilot team uses their OpenAPI spec as the primary source of truth for their API development, automating as many workflows as possible.

All the epilot team had to do was add some simple annotations to their OpenAPI spec, describing the Terraform resources that they wanted to create:

      operationId: getRole
      summary: getRole
      x-speakeasy-entity-operation: Role#get
      description: Get role by id
      - Roles
      - name: roleId
        x-speakeasy-match: id
        in: path
        required: true
          $ref: '#/components/schemas/RoleId'
          description: ok
                $ref: '#/components/schemas/Role'
      x-speakeasy-entity: Role
      - $ref: '#/components/schemas/UserRole'
      - $ref: '#/components/schemas/OrgRole'
      - $ref: '#/components/schemas/ShareRole'
      - $ref: '#/components/schemas/PartnerRole'

Now, whenever the epilot team updates their OpenAPI specs, Speakeasy’s Github workflow automatically regenerates their Terraform providers, runs a suite of tests, and then publishes a new version to the registry. No maintenance work required!

The Results: New Use Cases And New Customers

The proof is in the provider: epilot’s Registered Terraform Providers (opens in a new tab)

Snapshot of Epilot's Terraform provider github

Here’s a summary of the impact Speakeasy had on the project:

Epilot's cost savings from using Speakeasy

The money saved is obvious. Harder to quantify is the relief of removing a large chunk of work from the product roadmap as well as all the future work avoided by Speakeasy’s automated regeneration.

Speakeasy's unique offering of high-quality SDKs including a Terraform provider, all generated from our existing API specs allowed us to take a huge leap in our own product go-to-market.

We don't need to invest in hiring teams of specialist engineers — allowing us to focus on our core product.

Viljami Kuosmanen, Head of Engineering at epilot

Through the use of OpenAPI and Speakeasy, epilot was able to automate the creation of Terraform Providers, resulting in a massive acceleration of their roadmap at a fraction of the expected cost.