Provides a Heroku Add-On resource. These can be attach services to a Heroku app.
# Create a new Heroku app
resource "heroku_app" "default" {
name = "test-app"
}
# Create a database, and configure the app to use it
resource "heroku_addon" "database" {
app_id = heroku_app.default.id
plan = "heroku-postgresql:mini"
}
The following arguments are supported:
app_id
- (Required) Heroku app ID (do not use app name)plan
- (Required) The addon to add.config
- (Optional) Optional plan configuration.name
- (Optional) Globally unique name of the add-on.The following attributes are exported:
id
- The ID of the add-onname
- The add-on nameplan
- The plan nameprovider_id
- The ID of the plan providerconfig_vars
- The Configuration variables of the add-onconfig_var_values
- A sensitive map of the add-on's configuration variables. Upon add-on creation, these values will be up-to-date, while the app's own config_vars
require another Terraform refresh cycle to be updated. Useful when an output contains an add-on config var value, or when a configuration needs to operate on a new add-on during an apply.Addons can be imported using the Addon id
, e.g.
$ terraform import heroku_addon.foobar 12345678