From 0fee96acca409362de027c0ac85161cba92d2f95 Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Wed, 23 Jun 2021 10:45:47 -0400 Subject: [PATCH 1/4] document sni_endpoint_id --- docs/resources/domain.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/resources/domain.md b/docs/resources/domain.md index 01e76cbc..2ef953e6 100644 --- a/docs/resources/domain.md +++ b/docs/resources/domain.md @@ -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 From 48c03010ca361c432776f8fa50a4a6e44c5e43ee Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Wed, 23 Jun 2021 14:10:08 -0400 Subject: [PATCH 2/4] fix deprecation warning --- heroku/resource_heroku_cert.go | 2 ++ heroku/resource_heroku_ssl.go | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/heroku/resource_heroku_cert.go b/heroku/resource_heroku_cert.go index c1b620c3..a12347b8 100644 --- a/heroku/resource_heroku_cert.go +++ b/heroku/resource_heroku_cert.go @@ -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, diff --git a/heroku/resource_heroku_ssl.go b/heroku/resource_heroku_ssl.go index 0a3456ea..7ee6452a 100644 --- a/heroku/resource_heroku_ssl.go +++ b/heroku/resource_heroku_ssl.go @@ -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, From 2b888545601aff85205be1246007d44a234e3ab5 Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Wed, 23 Jun 2021 14:10:34 -0400 Subject: [PATCH 3/4] Allow sni_endpoint_id to be computed (this is to support apps with acm = true) --- heroku/resource_heroku_domain.go | 1 + 1 file changed, 1 insertion(+) diff --git a/heroku/resource_heroku_domain.go b/heroku/resource_heroku_domain.go index 88673fa3..e6c42089 100644 --- a/heroku/resource_heroku_domain.go +++ b/heroku/resource_heroku_domain.go @@ -41,6 +41,7 @@ func resourceHerokuDomain() *schema.Resource { "sni_endpoint_id": { Type: schema.TypeString, + Computed: true, Optional: true, }, }, From 235c990f338ac2780676a7bc38fae4f3762072d7 Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Wed, 23 Jun 2021 16:42:40 -0400 Subject: [PATCH 4/4] document how to create a domain without associating ssl --- docs/resources/ssl.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/resources/ssl.md b/docs/resources/ssl.md index 43ea3adf..39d51240 100644 --- a/docs/resources/ssl.md +++ b/docs/resources/ssl.md @@ -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