You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Terraform将GCP Vector Search索引部署至索引端点?

可行,Terraform支持该操作

你可以使用google_vertex_ai_index_endpoint_index资源来实现将索引部署到索引端点的操作,这对应gcloud的deploy-index命令。

示例配置

以下是基础的Terraform配置示例,假设你已经创建了google_vertex_ai_index(命名为my_index)和google_vertex_ai_index_endpoint(命名为my_index_endpoint):

resource "google_vertex_ai_index_endpoint_index" "deployed_index" {
  index_endpoint = google_vertex_ai_index_endpoint.my_index_endpoint.id
  index          = google_vertex_ai_index.my_index.id
  deployed_index_id = "my-deployed-index" # 自定义部署的索引ID

  dedicated_resources {
    machine_type = "n1-standard-8"
    min_replica_count = 1
    max_replica_count = 1
  }
}

关键参数说明

  • index_endpoint:关联已创建的索引端点的ID
  • index:关联已创建的向量搜索索引的ID
  • deployed_index_id:自定义的部署标识,需唯一
  • dedicated_resources:指定部署使用的资源配置,包括机器类型、副本数等

该资源的配置可根据实际需求调整,比如添加autoscaling_spec实现自动扩缩容,或者配置public_endpoint_enabled控制端点访问权限。

内容的提问来源于stack exchange,提问作者FeivelFei

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 08:54:51