providers/heroku: add cname to domain
This commit is contained in:
parent
26d5c093da
commit
accc477984
|
@ -34,6 +34,7 @@ func resource_heroku_domain_create(
|
|||
|
||||
rs.ID = do.Id
|
||||
rs.Attributes["hostname"] = do.Hostname
|
||||
rs.Attributes["cname"] = fmt.Sprintf("%s.herokuapp.com", app)
|
||||
|
||||
log.Printf("[INFO] Domain ID: %s", rs.ID)
|
||||
|
||||
|
@ -80,6 +81,7 @@ func resource_heroku_domain_refresh(
|
|||
}
|
||||
|
||||
s.Attributes["hostname"] = domain.Hostname
|
||||
s.Attributes["cname"] = fmt.Sprintf("%s.herokuapp.com", s.Attributes["app"])
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@ func TestAccHerokuDomain_Basic(t *testing.T) {
|
|||
"heroku_domain.foobar", "hostname", "terraform.example.com"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"heroku_domain.foobar", "app", "terraform-test-app"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"heroku_domain.foobar", "cname", "terraform-test-app.herokuapp.com"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue