Rancher: proper error when catalog template is unknown (#11544)
This commit is contained in:
parent
512b155f64
commit
001ee8c1af
|
@ -365,6 +365,10 @@ func makeStackData(d *schema.ResourceData, meta interface{}) (data map[string]in
|
||||||
return data, fmt.Errorf("Failed to get catalog template: %s", err)
|
return data, fmt.Errorf("Failed to get catalog template: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if template == nil {
|
||||||
|
return data, fmt.Errorf("Unknown catalog template %s", catalogID)
|
||||||
|
}
|
||||||
|
|
||||||
dockerCompose = template.Files["docker-compose.yml"].(string)
|
dockerCompose = template.Files["docker-compose.yml"].(string)
|
||||||
rancherCompose = template.Files["rancher-compose.yml"].(string)
|
rancherCompose = template.Files["rancher-compose.yml"].(string)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue