diff --git a/mmv1/products/vertexai/Models.yaml b/mmv1/products/vertexai/Models.yaml index bb871d686a6e..23db518660d8 100644 --- a/mmv1/products/vertexai/Models.yaml +++ b/mmv1/products/vertexai/Models.yaml @@ -37,6 +37,12 @@ async: result: path: 'response' resource_inside_response: true + status: + path: 'done' + complete: true + allowed: + - true + - false error: path: 'error' message: 'message' diff --git a/mmv1/templates/terraform/encoders/vertex_ai_models.tmpl b/mmv1/templates/terraform/encoders/vertex_ai_models.tmpl index 9124828225d4..6ed95105abb1 100644 --- a/mmv1/templates/terraform/encoders/vertex_ai_models.tmpl +++ b/mmv1/templates/terraform/encoders/vertex_ai_models.tmpl @@ -3,4 +3,20 @@ if obj["sourceModel"] != nil { delete(obj, "metadata") } +newObj := make(map[string]interface{}) +name := "" +if v, ok := d.GetOk("model_id"); ok { + name = v.(string) + delete(obj,"modelId") +} else { + name = d.Get("name").(string) +} +newObj["modelId"] = name +if v, ok := d.GetOk("parent_model"); ok { + newObj["parentModel"] = v + delete(obj,"parentModel") +} +newObj["model"] = obj +return newObj, nil + return obj, nil \ No newline at end of file