From d1a02dc5e0836f5d70e394417b63efcfd24808ec Mon Sep 17 00:00:00 2001 From: caetano-colin Date: Thu, 6 Jun 2024 11:35:07 -0300 Subject: [PATCH] add regional bucket and fix deployed index access --- .../genai-rag-multimodal/multimodal_rag_langchain.ipynb | 2 +- .../genai-rag-multimodal/multimodal_rag_langchain_infra.tf | 3 ++- examples/genai-rag-multimodal/variables.tf | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/genai-rag-multimodal/multimodal_rag_langchain.ipynb b/examples/genai-rag-multimodal/multimodal_rag_langchain.ipynb index 242a14e9..7e1cea33 100644 --- a/examples/genai-rag-multimodal/multimodal_rag_langchain.ipynb +++ b/examples/genai-rag-multimodal/multimodal_rag_langchain.ipynb @@ -699,7 +699,7 @@ "metadata": {}, "outputs": [], "source": [ - "SERVICE_ATTACHMENT=index_endpoint.deployed_indexes.private_endpoints.service_attachment\n", + "SERVICE_ATTACHMENT=index_endpoint.deployed_indexes[0].private_endpoints.service_attachment\n", "\n", "SERVICE_ATTACHMENT" ] diff --git a/examples/genai-rag-multimodal/multimodal_rag_langchain_infra.tf b/examples/genai-rag-multimodal/multimodal_rag_langchain_infra.tf index 438a439d..dd13746f 100644 --- a/examples/genai-rag-multimodal/multimodal_rag_langchain_infra.tf +++ b/examples/genai-rag-multimodal/multimodal_rag_langchain_infra.tf @@ -75,7 +75,8 @@ resource "random_string" "suffix" { resource "google_storage_bucket" "vector_search_bucket" { name = "vector-search-${random_string.suffix.result}" - location = "US" + location = var.vector_search_bucket_location + storage_class = "REGIONAL" project = var.machine_learning_project uniform_bucket_level_access = true } diff --git a/examples/genai-rag-multimodal/variables.tf b/examples/genai-rag-multimodal/variables.tf index f77180e4..ac3fe55c 100644 --- a/examples/genai-rag-multimodal/variables.tf +++ b/examples/genai-rag-multimodal/variables.tf @@ -4,6 +4,12 @@ variable "service_account_name" { default = "rag-notebook-runner" } +variable "vector_search_bucket_location" { + description = "Bucket Region" + type = string + default = "US-CENTRAL1" +} + variable "machine_learning_project" { description = "Machine Learning Project ID" type = string