Google ML Engine Model

This page shows how to write Terraform for ML Engine Model and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (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:

Parameters

  • description optional - string
    • The description specified for the model when it was created.

  • id optionalcomputed - string
  • labels optional - map / string
    • One or more labels that you can add, to organize your models.

  • name required - string
    • The name specified for the model.

  • online_prediction_console_logging optional - bool
    • If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging

  • online_prediction_logging optional - bool
    • If true, online prediction access logs are sent to StackDriver Logging.

  • project optionalcomputed - string
  • regions optional - list / string
    • The list of regions where the model is going to be deployed. Currently only one region per model is supported

Example Usage (from GitHub)

github-iconchinmaydorlikar/terraform-gcp
resource "google_ml_engine_model" "default" {
  name                              = var.name
  description                       = var.description
  regions                           = var.regions
  online_prediction_logging         = var.logging
  online_prediction_console_logging = var.console_logging
github-iconyaroslavopsguru/gcp-tf-resources
resource "google_ml_engine_model" "default" {
  name        = "terraform_test"
  description = "terraform_test"
  regions     = ["us-central1"]
  labels = {
    my_model = "foo"
github-iconniveklabs/google
resource "google_ml_engine_model" "this" {
  description                       = var.description
  labels                            = var.labels
  name                              = var.name
  online_prediction_console_logging = var.online_prediction_console_logging
  online_prediction_logging         = var.online_prediction_logging
github-iconstevewb1993/gdelt-ftse-modelling
resource "google_ml_engine_model" "gdelt_ftse_regression_model" {
  name        = "gdelt_ftse_regression_model"
  regions     = ["europe-west1"]
  default_version {
    name = "projects/gdelt-ftse/models/gdelt_ftse_regression_model/versions/v1"
  }

Frequently asked questions

What is Google ML Engine Model?

Google ML Engine Model is a resource for ML Engine of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google ML Engine Model?

For Terraform, the chinmaydorlikar/terraform-gcp, yaroslavopsguru/gcp-tf-resources and niveklabs/google source code examples are useful. See the Terraform Example section for further details.