google_vertex_ai_endpoint

Models are deployed into it, and afterwards Endpoint is called to obtain predictions and explanations.

To get more information about Endpoint, see:

Example Usage - Vertex Ai Endpoint Network

resource "google_vertex_ai_endpoint" "endpoint" {
  name         = "endpoint-name"
  display_name = "sample-endpoint"
  description  = "A sample vertex endpoint"
  location     = "us-central1"
  region       = "us-central1"
  labels       = {
    label-one = "value-one"
  }
  network      = "projects/${data.google_project.project.number}/global/networks/${google_compute_network.vertex_network.name}"
  encryption_spec {
    kms_key_name = "kms-name"
  }
  depends_on   = [
    google_service_networking_connection.vertex_vpc_connection
  ]
}

resource "google_service_networking_connection" "vertex_vpc_connection" {
  network                 = google_compute_network.vertex_network.id
  service                 = "servicenetworking.googleapis.com"
  reserved_peering_ranges = [google_compute_global_address.vertex_range.name]
}

resource "google_compute_global_address" "vertex_range" {
  name          = "address-name"
  purpose       = "VPC_PEERING"
  address_type  = "INTERNAL"
  prefix_length = 24
  network       = google_compute_network.vertex_network.id
}

resource "google_compute_network" "vertex_network" {
  name       = "network-name"
}

resource "google_kms_crypto_key_iam_member" "crypto_key" {
  crypto_key_id = "kms-name"
  role          = "roles/cloudkms.cryptoKeyEncrypterDecrypter"
  member        = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com"
}

data "google_project" "project" {}

Argument Reference

The following arguments are supported:


The encryption_spec block supports:

Attributes Reference

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

The deployed_models block contains:

The dedicated_resources block contains:

The machine_spec block contains:

The autoscaling_metric_specs block contains:

The automatic_resources block contains:

The private_endpoints block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Endpoint can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/locations/{{location}}/endpoints/{{name}}"
  to = google_vertex_ai_endpoint.default
}

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

$ terraform import google_vertex_ai_endpoint.default projects/{{project}}/locations/{{location}}/endpoints/{{name}}
$ terraform import google_vertex_ai_endpoint.default {{project}}/{{location}}/{{name}}
$ terraform import google_vertex_ai_endpoint.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.