Google ML Engine Model
This page shows how to write Terraform for ML Engine Model and write them securely.
google_ml_engine_model (Terraform)
The Model in ML Engine can be configured in Terraform with the resource name google_ml_engine_model
. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
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
resource "google_ml_engine_model" "default" {
name = "terraform_test"
description = "terraform_test"
regions = ["us-central1"]
labels = {
my_model = "foo"
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
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"
}
Parameters
-
description
optional - string
The description specified for the model when it was created.
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.
The list of regions where the model is going to be deployed. Currently only one region per model is supported
-
default_version
list block-
name
required - string
The name specified for the version when it was created.
-
-
timeouts
single block
Explanation in Terraform Registry
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:
- API documentation
- How-to Guides
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.