» heroku_formation

Provides a Heroku Formation resource.

A formation represents the formation of processes that should be set for an application.

» Example Usage

# Creates a new application called foobar
resource "heroku_app" "foobar" {
    name = "foobar"
    region = "us"
}

# Creates a new release for application foobar using a slug id
resource "heroku_app_release" "foobar-release" {
    app = "${heroku_app.foobar.name}"
    slug_id = "01234567-89ab-cdef-0123-456789abcdef"
}

# Update the web formation for the foobar application's web
resource "heroku_formation" "foobar-web" {
    app = "${heroku_app.foobar.name}"
    type = "web"
    quantity = 2
    size = "standard-2x"

    # Tells Terraform that this formation must be created/updated only after the app release has been created
    depends_on = ["heroku_app_release.foobar-release"]
}

» Argument Reference

  • app - (Required) The name of the application
  • type - (Required) type of process such as "web"
  • quantity - (Required) number of processes to maintain
  • size - (Required) dyno size (Example: “standard-1X”). Capitalization does not matter.

» Attributes Reference

The following attributes are exported:

  • id - The ID of the formation

» Import

Existing formations can be imported using the combination of the application name, a colon, and the formation's type.

For example:

$ terraform import heroku_formation.foobar-web foobar:web