blob: 9ea453ac94b0122d44b094f9c82890373a88e5e8 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Vertex AI"
description: |-
An endpoint indexes are deployed into.
---
# google\_vertex\_ai\_index\_endpoint
An endpoint indexes are deployed into. An index endpoint can have multiple deployed indexes.
To get more information about IndexEndpoint, see:
* [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.indexEndpoints/)
## Example Usage - Vertex Ai Index Endpoint
```hcl
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" {}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=vertex_ai_index_endpoint_with_psc&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Vertex Ai Index Endpoint With Psc
```hcl
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" {}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=vertex_ai_index_endpoint_with_public_endpoint&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Vertex Ai Index Endpoint With Public Endpoint
```hcl
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
}
```
## Argument Reference
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](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) 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](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `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](#nested_private_service_connect_config).
* `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.
<a name="nested_private_service_connect_config"></a>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.
## Attributes Reference
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.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
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](https://developer.hashicorp.com/terraform/language/import) to import IndexEndpoint using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/{{region}}/indexEndpoints/{{name}}"
to = google_vertex_ai_index_endpoint.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).