Provides a Heroku Formation resource.
A formation represents the formation of processes that should be set for an application.
Please note the following:
DELETE
endpoint for formation
.heroku_app_release
resource, which allows you to deploy a slug/release to an application
before the formation can be updated.# 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_id = heroku_app.foobar.id
slug_id = "01234567-89ab-cdef-0123-456789abcdef"
}
# Update the web formation for the foobar application's web
resource "heroku_formation" "foobar-web" {
app_id = heroku_app.foobar.id
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"]
}
app_id
- (Required) Heroku app ID (do not use app name)type
- (Required) type of process such as "web"quantity
- (Required) number of processes to maintainsize
- (Required) dyno size (Example: “standard-1X”). Capitalization does not matter.The following attributes are exported:
id
- The ID of the formationExisting 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