ce7cb702218693d08ea6d83464d2457c9250027c

This commit is contained in:
ms2k 2026-11-12 20:46:28 +09:00
commit 34c5f8963c

View file

@ -0,0 +1,32 @@
resource "google_project_service" "vertex_ai" {
project = var.project_id
service = "aiplatform.googleapis.com"
disable_on_destroy = false
}
resource "google_service_account" "agentgateway_vertex_ai" {
project = var.project_id
account_id = "********"
display_name = "Agentgateway Vertex AI"
}
resource "google_project_iam_member" "agentgateway_vertex_ai" {
project = var.project_id
role = "roles/aiplatform.user"
member = "serviceAccount:${google_service_account.agentgateway_vertex_ai.email}"
depends_on = [google_project_service.vertex_ai]
}
resource "google_service_account_key" "agentgateway_vertex_ai" {
service_account_id = google_service_account.agentgateway_vertex_ai.name
}
resource "vault_kv_secret_v2" "agentgateway_vertex_ai" {
mount = "secret"
name = "agentgateway/vertex-ai"
data_json = jsonencode({
credentials-json = base64decode(google_service_account_key.agentgateway_vertex_ai.private_key)
})
}