heroku_domain
Provides a Heroku App resource. This can be used to create and manage applications on Heroku.
Example Usage
# Create a new Heroku app resource "heroku_app" "default" { name = "test-app" } # Associate a custom domain resource "heroku_domain" "default" { app = "${heroku_app.default.name}" hostname = "terraform.example.com" }
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:
-
id
- The ID of the of the domain record. -
hostname
- The hostname traffic will be served as. -
cname
- The CNAME traffic should route to.
Importing
When importing a Heroku domain resource, the ID must be built using the app name colon the unique ID from the Heroku API. For an app named production-api
with a domain ID of b85d9224-310b-409b-891e-c903f5a40568
, you would import it as: $ terraform import heroku_domain.production_api production-api:b85d9224-310b-409b-891e-c903f5a40568
.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/heroku/r/domain.html