Terraform provider for ElephantSQL

Written by
Magnus Landerblom

Manage your ElephantSQL cluster as code with Terraform

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. It is an open source tool that codifies APIs.

We are happy to tell everyone that manage their infrastructure with Terraform, that you now easily can add ElephantSQL clusters into the solution. Terraform now allows you to create, update and delete ElephantSQL clusters. When you create your cluster, you can set all the available options in your Terraform plan and then when created, query the URL and get credentials needed to access the PostgreSQL cluster.

Information on how to install and an example terraform plan can be found at the Github repository:

https://github.com/ElephantSQL/terraform-provider

provider "elephantsql" {}

resource "elephantsql_instance" "sql_hippo" {
  name = "terraform-provider-test"
  plan = "hippo"
  region = "amazon-web-services::us-east-1"
}
output "psql_url" {
  value = "${elephantsql_instance.sql_hippo.url}"
}