An endpoint indexes are deployed into. An index endpoint can have multiple deployed indexes.
To get more information about IndexEndpoint, see:
resource "google_vertex_ai_index_endpoint" "index_endpoint" {
display_name = "sample-endpoint"
description = "A sample vertex endpoint"
region = "us-central1"
labels = {
label-one = "value-one"
}
network = "projects/${data.google_project.project.number}/global/networks/${google_compute_network.vertex_network.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"
}
data "google_project" "project" {}
resource "google_vertex_ai_index_endpoint" "index_endpoint" {
display_name = "sample-endpoint"
description = "A sample vertex endpoint"
region = "us-central1"
labels = {
label-one = "value-one"
}
private_service_connect_config {
enable_private_service_connect = true
project_allowlist = [
data.google_project.project.number,
]
}
}
data "google_project" "project" {}
resource "google_vertex_ai_index_endpoint" "index_endpoint" {
display_name = "sample-endpoint"
description = "A sample vertex endpoint with an public endpoint"
region = "us-central1"
labels = {
label-one = "value-one"
}
public_endpoint_enabled = true
}
The following arguments are supported:
display_name
-
(Required)
The display name of the Index. The name can be up to 128 characters long and can consist of any UTF-8 characters.description
-
(Optional)
The description of the Index.
labels
-
(Optional)
The labels with user-defined metadata to organize your Indexes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field effective_labels
for all of the labels present on the resource.
network
-
(Optional)
The full name of the Google Compute Engine network to which the index endpoint should be peered.
Private services access must already be configured for the network. If left unspecified, the index endpoint is not peered with any network.
Format: projects/{project}/global/networks/{network}
.
Where {project}
is a project number, as in 12345
, and {network}
is network name.
private_service_connect_config
-
(Optional)
Optional. Configuration for private service connect. network
and privateServiceConnectConfig
are mutually exclusive.
Structure is documented below.
public_endpoint_enabled
-
(Optional)
If true, the deployed index will be accessible through public endpoint.
region
-
(Optional)
The region of the index endpoint. eg us-central1
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
The private_service_connect_config
block supports:
enable_private_service_connect
-
(Required)
If set to true, the IndexEndpoint is created without private service access.
project_allowlist
-
(Optional)
A list of Projects from which the forwarding rule will target the service attachment.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}
name
-
The resource name of the Index.
etag
-
Used to perform consistent read-modify-write updates.
create_time
-
The timestamp of when the Index was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
update_time
-
The timestamp of when the Index was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
public_endpoint_domain_name
-
If publicEndpointEnabled is true, this field will be populated with the domain name to use for this index endpoint.
terraform_labels
-
The combination of labels configured directly on the resource
and default labels configured on the provider.
effective_labels
-
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.IndexEndpoint can be imported using any of these accepted formats:
projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}
{{project}}/{{region}}/{{name}}
{{region}}/{{name}}
{{name}}
In Terraform v1.5.0 and later, use an import
block to import IndexEndpoint using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}"
to = google_vertex_ai_index_endpoint.default
}
When using the terraform import
command, IndexEndpoint can be imported using one of the formats above. For example:
$ terraform import google_vertex_ai_index_endpoint.default projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}
$ terraform import google_vertex_ai_index_endpoint.default {{project}}/{{region}}/{{name}}
$ terraform import google_vertex_ai_index_endpoint.default {{region}}/{{name}}
$ terraform import google_vertex_ai_index_endpoint.default {{name}}
This resource supports User Project Overrides.