2014-07-24 17:05:33 +02:00
|
|
|
---
|
|
|
|
layout: "heroku"
|
|
|
|
page_title: "Heroku: heroku_addon"
|
|
|
|
sidebar_current: "docs-heroku-resource-addon"
|
2014-10-22 05:21:56 +02:00
|
|
|
description: |-
|
|
|
|
Provides a Heroku Add-On resource. These can be attach services to a Heroku app.
|
2014-07-24 17:05:33 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# heroku\_addon
|
|
|
|
|
|
|
|
Provides a Heroku Add-On resource. These can be attach
|
|
|
|
services to a Heroku app.
|
|
|
|
|
|
|
|
## 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 = "test-app"
|
2014-07-24 17:18:00 +02:00
|
|
|
}
|
|
|
|
|
2015-04-01 01:23:20 +02:00
|
|
|
# Create a database, and configure the app to use it
|
|
|
|
resource "heroku_addon" "database" {
|
2017-02-18 23:48:50 +01:00
|
|
|
app = "${heroku_app.default.name}"
|
2015-04-01 01:23:20 +02:00
|
|
|
plan = "heroku-postgresql:hobby-basic"
|
|
|
|
}
|
|
|
|
|
2014-07-24 17:05:33 +02:00
|
|
|
# Add a web-hook addon for the app
|
|
|
|
resource "heroku_addon" "webhook" {
|
2017-02-18 23:48:50 +01:00
|
|
|
app = "${heroku_app.default.name}"
|
|
|
|
plan = "deployhooks:http"
|
|
|
|
|
|
|
|
config {
|
|
|
|
url = "http://google.com"
|
|
|
|
}
|
2014-07-24 17:05:33 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `app` - (Required) The Heroku app to add to.
|
2014-07-24 17:18:00 +02:00
|
|
|
* `plan` - (Required) The addon to add.
|
2014-07-24 17:05:33 +02:00
|
|
|
* `config` - (Optional) Optional plan configuration.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the add-on
|
|
|
|
* `name` - The add-on name
|
|
|
|
* `plan` - The plan name
|
|
|
|
* `provider_id` - The ID of the plan provider
|
|
|
|
|