Managing Heroku apps and add-ons using Terraform

Heroku is a popular Platform-as-a-Service (PaaS), where you have absolutely no control over the infrastructure. But even for such platforms, Terraform can automate and manage things for you, so Heroku can do the rest. We'll create an app (a simple GitHub Hubot: http://hubot.github.com/), but feel free to use your own. On top of this app, we'll automatically plug a Heroku add-on (redis) and deploy everything.

Getting ready

To step through this recipe, you will need the following:

  • A working Terraform installation
  • A Heroku account (https://www.heroku.com/)
  • An optional Slack Token
  • An Internet connection

How to do it…

First things first: we need to define the Heroku provider. It consists of an e-mail address ...

Get Infrastructure as Code (IAC) Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.