Skip to content

Commit

Permalink
add source_model support for :copy
Browse files Browse the repository at this point in the history
  • Loading branch information
BBBmau committed Oct 18, 2024
1 parent 38d37c5 commit 7fbfbd4
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 117 deletions.
199 changes: 102 additions & 97 deletions mmv1/products/vertexai/Models.yaml

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
func flatten{{$.GetPrefix}}{{$.TitlelizeProperty}}(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
if d.Get("name").(string) == "" {
return v.(string)
}

return d.Get("name")
}
5 changes: 5 additions & 0 deletions mmv1/templates/terraform/encoders/vertex_ai_models.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if obj["sourceModel"] != nil {
delete(obj, "labels")
}

return obj, nil
13 changes: 0 additions & 13 deletions mmv1/templates/terraform/examples/vertex_ai_model_basic.tf.erb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "google_vertex_ai_models" "{{$.PrimaryResourceId}}" {
model_id = "{{index $.Vars "model_id"}}"
project = "{{index $.TestEnvVars "project_name"}}"
source_model = "projects/{{index $.TestEnvVars "project_name"}}>/locations/us-central1/models/4469245519628878651"

region = "us-central1"
}

0 comments on commit 7fbfbd4

Please sign in to comment.