heroku_drain

Provides a Heroku Drain resource. This can be used to create and manage Log Drains on Heroku.

Example Usage

resource "heroku_app" "foobar" {
  name = "foobar"
  region = "us"
}

resource "heroku_drain" "default" {
  app_id = heroku_app.foobar.id
  url = "syslog://terraform.example.com:1234"
}
resource "heroku_app" "foobar" {
  name = "foobar"
  region = "us"
}

resource "heroku_drain" "default" {
  app_id = heroku_app.foobar.id
  sensitive_url = "https://user:pass@terraform.example.com"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Importing

When importing a Heroku drain resource, the ID must be built using the app name colon the unique ID from the Heroku API. For an app named production-api with a drain ID of b85d9224-310b-409b-891e-c903f5a40568 and the url attribute value defined for the resource, you would import it as:

$ terraform import heroku_drain.production_api production-api:b85d9224-310b-409b-891e-c903f5a40568

When importing a Heroku drain resource, the ID must be built using the app name colon the unique ID from the Heroku API. For an app named production-api with a drain ID of b85d9224-310b-409b-891e-c903f5a40568 and the sensitive_url attribute value defined for the resource, you would import it as:

$ terraform import heroku_drain.production_api production-api:b85d9224-310b-409b-891e-c903f5a40568:sensitive