Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vertexai): Make it possible to create a public Vertex AI Index Endpoint #8852

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions mmv1/products/vertexai/IndexEndpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ examples:
network_name: "network-name"
test_vars_overrides:
network_name: 'acctest.BootstrapSharedTestNetwork(t, "vertex-ai-index-endpoint")'
- !ruby/object:Provider::Terraform::Examples
name: "vertex_ai_index_endpoint_with_public_endpoint"
primary_resource_id: "index_endpoint"
test_vars_overrides:
network_name: 'acctest.BootstrapSharedTestNetwork(t, "vertex-ai-index-endpoint")'
parameters:
- !ruby/object:Api::Type::String
name: region
Expand Down Expand Up @@ -97,3 +102,12 @@ properties:
[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.
immutable: true
- !ruby/object:Api::Type::Boolean
name: publicEndpointEnabled
immutable: true
ignore_read: true
Comment on lines +107 to +108
Copy link
Contributor Author

@shotarok shotarok Sep 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEMO]

I confirmed a response of projects.locations.indexEndpoints.get didn't include the publicEndpointEnabled like below.

Details
$ curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" https://us-central1-aiplatform.googleapis.com/v1/projects/xxx/locations/us-central1/indexEndpoints/5155064664874287104
{
  "name": "projects/xxxxx/locations/us-central1/indexEndpoints/5155064664874287104",
  "displayName": "sample-endpoint",
  "description": "A sample vertex endpoint with an public endpoint",
  "etag": "AMEw9yPkWvTjGqy1FSFN3Dc9NTn8J7Qaf09YteDcAF8JL6QaABLNasuBBOT1Cd9vTH4O",
  "labels": {
    "label-one": "value-one"
  },
  "createTime": "2023-09-02T19:29:32.917516Z",
  "updateTime": "2023-09-02T19:29:33.681500Z",
  "publicEndpointDomainName": "2086866499.us-central1-415528280434.vdb.vertexai.goog"
}

In addition, I confirmed projects.locations.indexEndpoints.patch couldn't update the field like below.

Details
$ curl -X PATCH -H "Authorization: Bearer $(gcloud auth print-access-token)" https://us-central1-aiplatform.googleapis.com/v1/projects/xxxx/locations/us-central1/indexEndpoints/5155064664874287104\?updateMask\=publicEndpointEnabled -H 'Content-Type: application/json' -d '{
 "description": "A sample vertex endpoint with an public endpoint",
 "displayName": "sample-endpoint",
 "labels": {
  "label-one": "value-one"
 },
 "publicEndpointEnabled": false
}'

{
  "name": "projects/xxxx/locations/us-central1/indexEndpoints/5155064664874287104",
  "displayName": "sample-endpoint",
  "description": "A sample vertex endpoint with an public endpoint",
  "labels": {
    "label-one": "value-one"
  },
  "createTime": "2023-09-02T19:29:32.917516Z",
  "updateTime": "2023-09-02T19:37:58.913067Z",
  "publicEndpointDomainName": "2086866499.us-central1-415528280434.vdb.vertexai.goog"
}

description: If true, the deployed index will be accessible through public endpoint.
- !ruby/object:Api::Type::String
name: publicEndpointDomainName
output: true
description: If publicEndpointEnabled is true, this field will be populated with the domain name to use for this index endpoint.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "google_vertex_ai_index_endpoint" "<%= ctx[:primary_resource_id] %>" {
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
}