Merge pull request #11772 from manuwelakanade/master
provider/consul: catalog entry service id should default to service name
This commit is contained in:
commit
606ed0747f
|
@ -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