google_ml_engine_model

Represents a machine learning solution.

A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container.

To get more information about Model, see:

Open in Cloud Shell

Example Usage - Ml Model Basic

resource "google_ml_engine_model" "default" {
  name        = "default"
  description = "My model"
  regions     = ["us-central1"]
}
Open in Cloud Shell

Example Usage - Ml Model Full

resource "google_ml_engine_model" "default" {
  name        = "default"
  description = "My model"
  regions     = ["us-central1"]
  labels = {
    my_model = "foo"
  }
  online_prediction_logging         = true
  online_prediction_console_logging = true
}

Argument Reference

The following arguments are supported:


The default_version block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Model can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Model using one of the formats above. For example:

import {
  id = "projects/{{project}}/models/{{name}}"
  to = google_ml_engine_model.default
}

When using the terraform import command, Model can be imported using one of the formats above. For example:

$ terraform import google_ml_engine_model.default projects/{{project}}/models/{{name}}
$ terraform import google_ml_engine_model.default {{project}}/{{name}}
$ terraform import google_ml_engine_model.default {{name}}

User Project Overrides

This resource supports User Project Overrides.