mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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 {
|
for i, rawService := range serviceList {
|
||||||
serviceData := rawService.(map[string]interface{})
|
serviceData := rawService.(map[string]interface{})
|
||||||
|
|
||||||
|
if len(serviceData["id"].(string)) == 0 {
|
||||||
|
serviceData["id"] = serviceData["name"].(string)
|
||||||
|
}
|
||||||
serviceID := serviceData["id"].(string)
|
serviceID := serviceData["id"].(string)
|
||||||
serviceIDs[i] = serviceID
|
serviceIDs[i] = serviceID
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user