provider/heroku: Correct issue with setting CName in heroku_domain (#14443)
This commit is contained in:
parent
cb15a5d0a7
commit
c159c48f5e
|
@ -51,7 +51,7 @@ func resourceHerokuDomainCreate(d *schema.ResourceData, meta interface{}) error
|
||||||
|
|
||||||
d.SetId(do.ID)
|
d.SetId(do.ID)
|
||||||
d.Set("hostname", do.Hostname)
|
d.Set("hostname", do.Hostname)
|
||||||
d.Set("cname", fmt.Sprintf("%s.herokuapp.com", app))
|
d.Set("cname", do.CName)
|
||||||
|
|
||||||
log.Printf("[INFO] Domain ID: %s", d.Id())
|
log.Printf("[INFO] Domain ID: %s", d.Id())
|
||||||
return nil
|
return nil
|
||||||
|
@ -81,7 +81,7 @@ func resourceHerokuDomainRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
d.Set("hostname", do.Hostname)
|
d.Set("hostname", do.Hostname)
|
||||||
d.Set("cname", fmt.Sprintf("%s.herokuapp.com", app))
|
d.Set("cname", do.CName)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@ func TestAccHerokuDomain_Basic(t *testing.T) {
|
||||||
resource.TestCheckResourceAttr(
|
resource.TestCheckResourceAttr(
|
||||||
"heroku_domain.foobar", "app", appName),
|
"heroku_domain.foobar", "app", appName),
|
||||||
resource.TestCheckResourceAttr(
|
resource.TestCheckResourceAttr(
|
||||||
"heroku_domain.foobar", "cname",
|
"heroku_domain.foobar", "cname", "terraform.example.com.herokudns.com"),
|
||||||
fmt.Sprintf("%s.herokuapp.com", appName)),
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue