Skip to content

Commit

Permalink
Merge pull request #316 from heroku/domain-fixes
Browse files Browse the repository at this point in the history
Domain fixes
  • Loading branch information
davidji99 authored Jun 24, 2021
2 parents bd878ad + 235c990 commit b274a20
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/resources/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The following attributes are exported:
* `id` - The ID of the domain record.
* `hostname` - The hostname traffic will be served as.
* `cname` - The CNAME traffic should route to.
* `sni_endpoint_id` - The ID of the heroku_ssl resource to associate the domain with.

## Importing

Expand Down
7 changes: 7 additions & 0 deletions docs/resources/ssl.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ resource "heroku_ssl" "one" {
depends_on = [heroku_formation.web]
}
resource "heroku_domain" "no-ssl" {
app = heroku_app.default.name
hostname = "terraform-123-no-ssl.example.com"
# Until November 2021 if you have an ssl resource, but do not want to associate it with a domain, you must ensure the domain is created after the ssl resource. See https://devcenter.heroku.com/changelog-items/2192 for more details. We do this by adding a depends_on for the ssl resources.
depends_on = [heroku_ssl.one]
}
# Associate it with a domain
resource "heroku_domain" "one" {
app = heroku_app.default.name
Expand Down
2 changes: 2 additions & 0 deletions heroku/resource_heroku_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (

func resourceHerokuCert() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "This resource is deprecated in favor of `heroku_ssl`.",

Create: resourceHerokuCertCreate,
Read: resourceHerokuCertRead,
Update: resourceHerokuCertUpdate,
Expand Down
1 change: 1 addition & 0 deletions heroku/resource_heroku_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func resourceHerokuDomain() *schema.Resource {

"sni_endpoint_id": {
Type: schema.TypeString,
Computed: true,
Optional: true,
},
},
Expand Down
2 changes: 0 additions & 2 deletions heroku/resource_heroku_ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (

func resourceHerokuSSL() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "This resource is deprecated in favor of `heroku_ssl`.",

CreateContext: resourceHerokuSSLCreate,
ReadContext: resourceHerokuSSLRead,
UpdateContext: resourceHerokuSSLUpdate,
Expand Down

0 comments on commit b274a20

Please sign in to comment.