2014-07-24 17:18:00 +02:00
|
|
|
---
|
|
|
|
layout: "heroku"
|
|
|
|
page_title: "Heroku: heroku_domain"
|
|
|
|
sidebar_current: "docs-heroku-resource-domain"
|
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\_domain
|
|
|
|
|
|
|
|
Provides a Heroku App resource. This can be used to
|
|
|
|
create and manage applications on Heroku.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
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
|
|
|
}
|
|
|
|
|
|
|
|
# Associate a custom domain
|
|
|
|
resource "heroku_domain" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
app = "${heroku_app.default.name}"
|
|
|
|
hostname = "terraform.example.com"
|
2014-07-24 17:18:00 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `hostname` - (Required) The hostname to serve requests from.
|
|
|
|
* `app` - (Required) The Heroku app to link to.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
2015-01-03 19:31:53 +01:00
|
|
|
* `id` - The ID of the of the domain record.
|
|
|
|
* `hostname` - The hostname traffic will be served as.
|
|
|
|
* `cname` - The CNAME traffic should route to.
|
2014-07-24 17:18:00 +02:00
|
|
|
|