2014-07-24 17:18:00 +02:00
|
|
|
---
|
|
|
|
layout: "heroku"
|
|
|
|
page_title: "Heroku: heroku_app"
|
|
|
|
sidebar_current: "docs-heroku-resource-app"
|
2014-10-22 05:21:56 +02:00
|
|
|
description: |-
|
|
|
|
Provides a Heroku App resource. This can be used to create and manage applications on Heroku.
|
2014-07-24 17:18:00 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# heroku\_app
|
|
|
|
|
|
|
|
Provides a Heroku App resource. This can be used to
|
|
|
|
create and manage applications on Heroku.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-17 12:17:54 +02:00
|
|
|
```hcl
|
2015-01-03 19:31:53 +01:00
|
|
|
# Create a new Heroku app
|
2014-07-24 17:18:00 +02:00
|
|
|
resource "heroku_app" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "my-cool-app"
|
|
|
|
region = "us"
|
2014-07-25 05:30:59 +02:00
|
|
|
|
2017-02-18 23:48:50 +01:00
|
|
|
config_vars {
|
|
|
|
FOOBAR = "baz"
|
|
|
|
}
|
2017-04-24 20:29:28 +02:00
|
|
|
|
|
|
|
buildpacks = [
|
|
|
|
"heroku/go"
|
|
|
|
]
|
2014-07-24 17:18:00 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
2014-08-28 00:50:38 +02:00
|
|
|
* `name` - (Required) The name of the application. In Heroku, this is also the
|
|
|
|
unique ID, so it must be unique and have a minimum of 3 characters.
|
|
|
|
* `region` - (Required) The region that the app should be deployed in.
|
2014-07-25 05:30:59 +02:00
|
|
|
* `stack` - (Optional) The application stack is what platform to run the application
|
|
|
|
in.
|
2017-04-24 20:29:28 +02:00
|
|
|
* `buildpacks` - (Optional) Buildpack names or URLs for the application.
|
|
|
|
Buildpacks configured externally won't be altered if this is not present.
|
2014-07-25 05:30:59 +02:00
|
|
|
* `config_vars` - (Optional) Configuration variables for the application.
|
2014-08-28 01:26:03 +02:00
|
|
|
The config variables in this map are not the final set of configuration
|
|
|
|
variables, but rather variables you want present. That is, other
|
|
|
|
configuration variables set externally won't be removed by Terraform
|
2015-01-14 18:28:25 +01:00
|
|
|
if they aren't present in this list.
|
2017-04-21 23:28:35 +02:00
|
|
|
* `space` - (Optional) The name of a private space to create the app in.
|
2014-10-21 08:17:44 +02:00
|
|
|
* `organization` - (Optional) A block that can be specified once to define
|
|
|
|
organization settings for this app. The fields for this block are
|
|
|
|
documented below.
|
2014-10-14 22:50:10 +02:00
|
|
|
|
2014-10-21 08:17:44 +02:00
|
|
|
The `organization` block supports:
|
|
|
|
|
|
|
|
* `name` (string) - The name of the organization.
|
|
|
|
* `locked` (boolean)
|
|
|
|
* `personal` (boolean)
|
2014-07-24 17:18:00 +02:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
2014-07-25 05:30:59 +02:00
|
|
|
* `id` - The ID of the app. This is also the name of the application.
|
|
|
|
* `name` - The name of the application. In Heroku, this is also the
|
|
|
|
unique ID.
|
|
|
|
* `stack` - The application stack is what platform to run the application
|
|
|
|
in.
|
2017-04-21 23:28:35 +02:00
|
|
|
* `space` - The private space the app should run in.
|
2014-07-25 05:30:59 +02:00
|
|
|
* `region` - The region that the app should be deployed in.
|
2014-07-29 08:51:24 +02:00
|
|
|
* `git_url` - The Git URL for the application. This is used for
|
2014-07-25 05:30:59 +02:00
|
|
|
deploying new versions of the app.
|
|
|
|
* `web_url` - The web (HTTP) URL that the application can be accessed
|
|
|
|
at by default.
|
2014-08-07 09:19:56 +02:00
|
|
|
* `heroku_hostname` - A hostname for the Heroku application, suitable
|
2014-07-25 05:30:59 +02:00
|
|
|
for pointing DNS records.
|
2014-08-28 01:34:43 +02:00
|
|
|
* `all_config_vars` - A map of all of the configuration variables that
|
|
|
|
exist for the app, containing both those set by Terraform and those
|
|
|
|
set externally.
|