0

I cannot find any documentation about Heroku's automated certificate management. The terraform documentation for heroku_cert only refers to certificates which are generated manually:

# Create a new Heroku app
resource "heroku_app" "default" {
  name = "test-app"
}

# Add-on SSL to application
resource "heroku_addon" "ssl" {
  app  = "${heroku_app.default.name}"
  plan = "ssl"
}

# Establish certificate for a given application
resource "heroku_cert" "ssl_certificate" {
  app               = "${heroku_app.default.name}"
  certificate_chain = "${file("server.crt")}"
  private_key       = "${file("server.key")}"
  depends_on        = "heroku_addon.ssl"
}

certificate_chain and private_key are required and I don't know where I should get those.

Chrisissorry
  • 139
  • 7

1 Answers1

1

Heroku's automated certificate management feature can be enabled for your app by setting the acm flag. Looks like this field is a boolean and would be set to true. See https://www.terraform.io/docs/providers/heroku/r/app.html#acm

# Create a new Heroku app
resource "heroku_app" "default" {
  name = "test-app"
  acm  = "true"
}
Mike Marseglia
  • 883
  • 7
  • 18