provider/consul: catalog entry service id should default to service name
This commit is contained in:
parent
bd5a5b0b29
commit
0942aed7a3
|
@ -147,6 +147,9 @@ func resourceConsulCatalogEntryCreate(d *schema.ResourceData, meta interface{})
|
|||
for i, rawService := range serviceList {
|
||||
serviceData := rawService.(map[string]interface{})
|
||||
|
||||
if len(serviceData["id"].(string)) == 0 {
|
||||
serviceData["id"] = serviceData["name"].(string)
|
||||
}
|
||||
serviceID := serviceData["id"].(string)
|
||||
serviceIDs[i] = serviceID
|
||||
|
||||
|
|
Loading…
Reference in New Issue