published on Monday, Oct 5, 2026 by Pulumi
published on Monday, Oct 5, 2026 by Pulumi
A RAG corpus is a container for user data uploaded to Vertex AI RAG Engine for chunking, embedding, and indexing.
To get more information about RagCorpus, see:
- API documentation
- How-to Guides
Example Usage
Vertex Ai Rag Corpus Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus",
description: "A basic RAG corpus",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
knn: {},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus",
description="A basic RAG corpus",
region="europe-west4",
vector_db_config={
"rag_managed_db": {
"knn": {},
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus"),
Description: pulumi.String("A basic RAG corpus"),
Region: pulumi.String("europe-west4"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus",
Description = "A basic RAG corpus",
Region = "europe-west4",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
{
Knn = null,
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus")
.description("A basic RAG corpus")
.region("europe-west4")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
.knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
.build())
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus
description: A basic RAG corpus
region: europe-west4
vectorDbConfig:
ragManagedDb:
knn: {}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
display_name = "rag-corpus"
description = "A basic RAG corpus"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
knn = {}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
Vertex Ai Rag Corpus Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus-full",
description: "A RAG corpus with a customer-managed encryption key",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
ann: {
treeDepth: 2,
leafCount: 500,
},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
encryptionSpec: {
kmsKeyName: "kms-key",
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus-full",
description="A RAG corpus with a customer-managed encryption key",
region="europe-west4",
vector_db_config={
"rag_managed_db": {
"ann": {
"tree_depth": 2,
"leaf_count": 500,
},
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
encryption_spec={
"kms_key_name": "kms-key",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-full"),
Description: pulumi.String("A RAG corpus with a customer-managed encryption key"),
Region: pulumi.String("europe-west4"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
Ann: &vertex.AiRagCorpusVectorDbConfigRagManagedDbAnnArgs{
TreeDepth: pulumi.Int(2),
LeafCount: pulumi.Int(500),
},
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
},
},
},
EncryptionSpec: &vertex.AiRagCorpusEncryptionSpecArgs{
KmsKeyName: pulumi.String("kms-key"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus-full",
Description = "A RAG corpus with a customer-managed encryption key",
Region = "europe-west4",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
{
Ann = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbAnnArgs
{
TreeDepth = 2,
LeafCount = 500,
},
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
EncryptionSpec = new Gcp.Vertex.Inputs.AiRagCorpusEncryptionSpecArgs
{
KmsKeyName = "kms-key",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbAnnArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusEncryptionSpecArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus-full")
.description("A RAG corpus with a customer-managed encryption key")
.region("europe-west4")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
.ann(AiRagCorpusVectorDbConfigRagManagedDbAnnArgs.builder()
.treeDepth(2)
.leafCount(500)
.build())
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
.build())
.build())
.build())
.encryptionSpec(AiRagCorpusEncryptionSpecArgs.builder()
.kmsKeyName("kms-key")
.build())
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus-full
description: A RAG corpus with a customer-managed encryption key
region: europe-west4
vectorDbConfig:
ragManagedDb:
ann:
treeDepth: 2
leafCount: 500
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
encryptionSpec:
kmsKeyName: kms-key
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
display_name = "rag-corpus-full"
description = "A RAG corpus with a customer-managed encryption key"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
ann = {
tree_depth = 2
leaf_count = 500
}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
encryption_spec = {
kms_key_name = "kms-key"
}
}
Vertex Ai Rag Corpus Search
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus-search",
description: "A RAG corpus with Vertex AI Search",
region: "europe-west4",
vertexAiSearchConfig: {
servingConfig: project.then(project => `projects/${project.number}/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config`),
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus-search",
description="A RAG corpus with Vertex AI Search",
region="europe-west4",
vertex_ai_search_config={
"serving_config": f"projects/{project.number}/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-search"),
Description: pulumi.String("A RAG corpus with Vertex AI Search"),
Region: pulumi.String("europe-west4"),
VertexAiSearchConfig: &vertex.AiRagCorpusVertexAiSearchConfigArgs{
ServingConfig: pulumi.Sprintf("projects/%v/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config", project.Number),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus-search",
Description = "A RAG corpus with Vertex AI Search",
Region = "europe-west4",
VertexAiSearchConfig = new Gcp.Vertex.Inputs.AiRagCorpusVertexAiSearchConfigArgs
{
ServingConfig = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVertexAiSearchConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus-search")
.description("A RAG corpus with Vertex AI Search")
.region("europe-west4")
.vertexAiSearchConfig(AiRagCorpusVertexAiSearchConfigArgs.builder()
.servingConfig(String.format("projects/%s/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config", project.number()))
.build())
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus-search
description: A RAG corpus with Vertex AI Search
region: europe-west4
vertexAiSearchConfig:
servingConfig: projects/${project.number}/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
display_name = "rag-corpus-search"
description = "A RAG corpus with Vertex AI Search"
region = "europe-west4"
vertex_ai_search_config = {
serving_config ="projects/${data.gcp_organizations_getproject.project.number}/locations/global/collections/default_collection/engines/test/servingConfigs/default_serving_config"
}
}
Vertex Ai Rag Corpus Pinecone
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus-pinecone",
description: "A RAG corpus with Pinecone",
region: "europe-west4",
vectorDbConfig: {
pinecone: {
indexName: "test-index",
},
apiAuth: {
apiKeyConfig: {
apiKeyString: "secret-api-key",
},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus-pinecone",
description="A RAG corpus with Pinecone",
region="europe-west4",
vector_db_config={
"pinecone": {
"index_name": "test-index",
},
"api_auth": {
"api_key_config": {
"api_key_string": "secret-api-key",
},
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-pinecone"),
Description: pulumi.String("A RAG corpus with Pinecone"),
Region: pulumi.String("europe-west4"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
Pinecone: &vertex.AiRagCorpusVectorDbConfigPineconeArgs{
IndexName: pulumi.String("test-index"),
},
ApiAuth: &vertex.AiRagCorpusVectorDbConfigApiAuthArgs{
ApiKeyConfig: &vertex.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs{
ApiKeyString: pulumi.String("secret-api-key"),
},
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus-pinecone",
Description = "A RAG corpus with Pinecone",
Region = "europe-west4",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
Pinecone = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigPineconeArgs
{
IndexName = "test-index",
},
ApiAuth = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthArgs
{
ApiKeyConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs
{
ApiKeyString = "secret-api-key",
},
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigPineconeArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigApiAuthArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus-pinecone")
.description("A RAG corpus with Pinecone")
.region("europe-west4")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.pinecone(AiRagCorpusVectorDbConfigPineconeArgs.builder()
.indexName("test-index")
.build())
.apiAuth(AiRagCorpusVectorDbConfigApiAuthArgs.builder()
.apiKeyConfig(AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs.builder()
.apiKeyString("secret-api-key")
.build())
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
.build())
.build())
.build())
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus-pinecone
description: A RAG corpus with Pinecone
region: europe-west4
vectorDbConfig:
pinecone:
indexName: test-index
apiAuth:
apiKeyConfig:
apiKeyString: secret-api-key
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
display_name = "rag-corpus-pinecone"
description = "A RAG corpus with Pinecone"
region = "europe-west4"
vector_db_config = {
pinecone = {
index_name = "test-index"
}
api_auth = {
api_key_config = {
api_key_string = "secret-api-key"
}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
Vertex Ai Rag Corpus Vertex Vector Search
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const index = new gcp.vertex.AiIndex("index", {
region: "europe-west4",
displayName: "index-test",
description: "test index",
indexUpdateMethod: "STREAM_UPDATE",
metadata: {
config: {
dimensions: 768,
distanceMeasureType: "COSINE_DISTANCE",
featureNormType: "UNIT_L2_NORM",
algorithmConfig: {
bruteForceConfig: {},
},
},
},
});
const indexEndpoint = new gcp.vertex.AiIndexEndpoint("index_endpoint", {
displayName: "endpoint-test",
description: "test endpoint",
region: "europe-west4",
publicEndpointEnabled: true,
});
const deployedIndex = new gcp.vertex.AiIndexEndpointDeployedIndex("deployed_index", {
deployedIndexId: "deployed_index",
displayName: "deployed_index",
region: "europe-west4",
index: index.id,
indexEndpoint: indexEndpoint.id,
automaticResources: {
minReplicaCount: 1,
maxReplicaCount: 1,
},
});
const project = gcp.organizations.getProject({});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus-vector-search",
description: "A RAG corpus with Vertex Vector Search",
region: "europe-west4",
vectorDbConfig: {
vertexVectorSearch: {
indexEndpoint: pulumi.all([project, indexEndpoint.name]).apply(([project, name]) => `projects/${project.number}/locations/europe-west4/indexEndpoints/${name}`),
index: pulumi.all([project, index.name]).apply(([project, name]) => `projects/${project.number}/locations/europe-west4/indexes/${name}`),
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
}, {
dependsOn: [deployedIndex],
});
import pulumi
import pulumi_gcp as gcp
index = gcp.vertex.AiIndex("index",
region="europe-west4",
display_name="index-test",
description="test index",
index_update_method="STREAM_UPDATE",
metadata={
"config": {
"dimensions": 768,
"distance_measure_type": "COSINE_DISTANCE",
"feature_norm_type": "UNIT_L2_NORM",
"algorithm_config": {
"brute_force_config": {},
},
},
})
index_endpoint = gcp.vertex.AiIndexEndpoint("index_endpoint",
display_name="endpoint-test",
description="test endpoint",
region="europe-west4",
public_endpoint_enabled=True)
deployed_index = gcp.vertex.AiIndexEndpointDeployedIndex("deployed_index",
deployed_index_id="deployed_index",
display_name="deployed_index",
region="europe-west4",
index=index.id,
index_endpoint=index_endpoint.id,
automatic_resources={
"min_replica_count": 1,
"max_replica_count": 1,
})
project = gcp.organizations.get_project()
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus-vector-search",
description="A RAG corpus with Vertex Vector Search",
region="europe-west4",
vector_db_config={
"vertex_vector_search": {
"index_endpoint": index_endpoint.name.apply(lambda name: f"projects/{project.number}/locations/europe-west4/indexEndpoints/{name}"),
"index": index.name.apply(lambda name: f"projects/{project.number}/locations/europe-west4/indexes/{name}"),
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
opts = pulumi.ResourceOptions(depends_on=[deployed_index]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
index, err := vertex.NewAiIndex(ctx, "index", &vertex.AiIndexArgs{
Region: pulumi.String("europe-west4"),
DisplayName: pulumi.String("index-test"),
Description: pulumi.String("test index"),
IndexUpdateMethod: pulumi.String("STREAM_UPDATE"),
Metadata: &vertex.AiIndexMetadataArgs{
Config: &vertex.AiIndexMetadataConfigArgs{
Dimensions: pulumi.Int(768),
DistanceMeasureType: pulumi.String("COSINE_DISTANCE"),
FeatureNormType: pulumi.String("UNIT_L2_NORM"),
AlgorithmConfig: &vertex.AiIndexMetadataConfigAlgorithmConfigArgs{
BruteForceConfig: &vertex.AiIndexMetadataConfigAlgorithmConfigBruteForceConfigArgs{},
},
},
},
})
if err != nil {
return err
}
indexEndpoint, err := vertex.NewAiIndexEndpoint(ctx, "index_endpoint", &vertex.AiIndexEndpointArgs{
DisplayName: pulumi.String("endpoint-test"),
Description: pulumi.String("test endpoint"),
Region: pulumi.String("europe-west4"),
PublicEndpointEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
deployedIndex, err := vertex.NewAiIndexEndpointDeployedIndex(ctx, "deployed_index", &vertex.AiIndexEndpointDeployedIndexArgs{
DeployedIndexId: pulumi.String("deployed_index"),
DisplayName: pulumi.String("deployed_index"),
Region: pulumi.String("europe-west4"),
Index: index.ID().ToIDOutput().ToStringOutput(),
IndexEndpoint: indexEndpoint.ID().ToIDOutput().ToStringOutput(),
AutomaticResources: &vertex.AiIndexEndpointDeployedIndexAutomaticResourcesArgs{
MinReplicaCount: pulumi.Int(1),
MaxReplicaCount: pulumi.Int(1),
},
})
if err != nil {
return err
}
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-vector-search"),
Description: pulumi.String("A RAG corpus with Vertex Vector Search"),
Region: pulumi.String("europe-west4"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
VertexVectorSearch: &vertex.AiRagCorpusVectorDbConfigVertexVectorSearchArgs{
IndexEndpoint: indexEndpoint.Name.ApplyT(func(name string) (string, error) {
return fmt.Sprintf("projects/%v/locations/europe-west4/indexEndpoints/%v", project.Number, name), nil
}).(pulumi.StringOutput),
Index: index.Name.ApplyT(func(name string) (string, error) {
return fmt.Sprintf("projects/%v/locations/europe-west4/indexes/%v", project.Number, name), nil
}).(pulumi.StringOutput),
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
deployedIndex,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var index = new Gcp.Vertex.AiIndex("index", new()
{
Region = "europe-west4",
DisplayName = "index-test",
Description = "test index",
IndexUpdateMethod = "STREAM_UPDATE",
Metadata = new Gcp.Vertex.Inputs.AiIndexMetadataArgs
{
Config = new Gcp.Vertex.Inputs.AiIndexMetadataConfigArgs
{
Dimensions = 768,
DistanceMeasureType = "COSINE_DISTANCE",
FeatureNormType = "UNIT_L2_NORM",
AlgorithmConfig = new Gcp.Vertex.Inputs.AiIndexMetadataConfigAlgorithmConfigArgs
{
BruteForceConfig = null,
},
},
},
});
var indexEndpoint = new Gcp.Vertex.AiIndexEndpoint("index_endpoint", new()
{
DisplayName = "endpoint-test",
Description = "test endpoint",
Region = "europe-west4",
PublicEndpointEnabled = true,
});
var deployedIndex = new Gcp.Vertex.AiIndexEndpointDeployedIndex("deployed_index", new()
{
DeployedIndexId = "deployed_index",
DisplayName = "deployed_index",
Region = "europe-west4",
Index = index.Id,
IndexEndpoint = indexEndpoint.Id,
AutomaticResources = new Gcp.Vertex.Inputs.AiIndexEndpointDeployedIndexAutomaticResourcesArgs
{
MinReplicaCount = 1,
MaxReplicaCount = 1,
},
});
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus-vector-search",
Description = "A RAG corpus with Vertex Vector Search",
Region = "europe-west4",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
VertexVectorSearch = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigVertexVectorSearchArgs
{
IndexEndpoint = Output.Tuple(project, indexEndpoint.Name).Apply(values =>
{
var project = values.Item1;
var name = values.Item2;
return $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/indexEndpoints/{name}";
}),
Index = Output.Tuple(project, index.Name).Apply(values =>
{
var project = values.Item1;
var name = values.Item2;
return $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/indexes/{name}";
}),
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
deployedIndex,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vertex.AiIndex;
import com.pulumi.gcp.vertex.AiIndexArgs;
import com.pulumi.gcp.vertex.inputs.AiIndexMetadataArgs;
import com.pulumi.gcp.vertex.inputs.AiIndexMetadataConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiIndexMetadataConfigAlgorithmConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiIndexMetadataConfigAlgorithmConfigBruteForceConfigArgs;
import com.pulumi.gcp.vertex.AiIndexEndpoint;
import com.pulumi.gcp.vertex.AiIndexEndpointArgs;
import com.pulumi.gcp.vertex.AiIndexEndpointDeployedIndex;
import com.pulumi.gcp.vertex.AiIndexEndpointDeployedIndexArgs;
import com.pulumi.gcp.vertex.inputs.AiIndexEndpointDeployedIndexAutomaticResourcesArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigVertexVectorSearchArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var index = new AiIndex("index", AiIndexArgs.builder()
.region("europe-west4")
.displayName("index-test")
.description("test index")
.indexUpdateMethod("STREAM_UPDATE")
.metadata(AiIndexMetadataArgs.builder()
.config(AiIndexMetadataConfigArgs.builder()
.dimensions(768)
.distanceMeasureType("COSINE_DISTANCE")
.featureNormType("UNIT_L2_NORM")
.algorithmConfig(AiIndexMetadataConfigAlgorithmConfigArgs.builder()
.bruteForceConfig(AiIndexMetadataConfigAlgorithmConfigBruteForceConfigArgs.builder()
.build())
.build())
.build())
.build())
.build());
var indexEndpoint = new AiIndexEndpoint("indexEndpoint", AiIndexEndpointArgs.builder()
.displayName("endpoint-test")
.description("test endpoint")
.region("europe-west4")
.publicEndpointEnabled(true)
.build());
var deployedIndex = new AiIndexEndpointDeployedIndex("deployedIndex", AiIndexEndpointDeployedIndexArgs.builder()
.deployedIndexId("deployed_index")
.displayName("deployed_index")
.region("europe-west4")
.index(index.id())
.indexEndpoint(indexEndpoint.id())
.automaticResources(AiIndexEndpointDeployedIndexAutomaticResourcesArgs.builder()
.minReplicaCount(1)
.maxReplicaCount(1)
.build())
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus-vector-search")
.description("A RAG corpus with Vertex Vector Search")
.region("europe-west4")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.vertexVectorSearch(AiRagCorpusVectorDbConfigVertexVectorSearchArgs.builder()
.indexEndpoint(indexEndpoint.name().applyValue(_name -> String.format("projects/%s/locations/europe-west4/indexEndpoints/%s", project.number(),_name)))
.index(index.name().applyValue(_name -> String.format("projects/%s/locations/europe-west4/indexes/%s", project.number(),_name)))
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(deployedIndex)
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus-vector-search
description: A RAG corpus with Vertex Vector Search
region: europe-west4
vectorDbConfig:
vertexVectorSearch:
indexEndpoint: projects/${project.number}/locations/europe-west4/indexEndpoints/${indexEndpoint.name}
index: projects/${project.number}/locations/europe-west4/indexes/${index.name}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
options:
dependsOn:
- ${deployedIndex}
index:
type: gcp:vertex:AiIndex
properties:
region: europe-west4
displayName: index-test
description: test index
indexUpdateMethod: STREAM_UPDATE
metadata:
config:
dimensions: 768
distanceMeasureType: COSINE_DISTANCE
featureNormType: UNIT_L2_NORM
algorithmConfig:
bruteForceConfig: {}
indexEndpoint:
type: gcp:vertex:AiIndexEndpoint
name: index_endpoint
properties:
displayName: endpoint-test
description: test endpoint
region: europe-west4
publicEndpointEnabled: true
deployedIndex:
type: gcp:vertex:AiIndexEndpointDeployedIndex
name: deployed_index
properties:
deployedIndexId: deployed_index
displayName: deployed_index
region: europe-west4
index: ${index.id}
indexEndpoint: ${indexEndpoint.id}
automaticResources:
minReplicaCount: 1
maxReplicaCount: 1
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
depends_on = [gcp_vertex_aiindexendpointdeployedindex.deployed_index]
display_name = "rag-corpus-vector-search"
description = "A RAG corpus with Vertex Vector Search"
region = "europe-west4"
vector_db_config = {
vertex_vector_search = {
index_endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/indexEndpoints/${gcp_vertex_aiindexendpoint.index_endpoint.name}"
index ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/indexes/${gcp_vertex_aiindex.index.name}"
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
resource "gcp_vertex_aiindex" "index" {
region = "europe-west4"
display_name = "index-test"
description = "test index"
index_update_method = "STREAM_UPDATE"
metadata = {
config = {
dimensions = 768
distance_measure_type = "COSINE_DISTANCE"
feature_norm_type = "UNIT_L2_NORM"
algorithm_config = {
brute_force_config = {}
}
}
}
}
resource "gcp_vertex_aiindexendpoint" "index_endpoint" {
display_name = "endpoint-test"
description = "test endpoint"
region = "europe-west4"
public_endpoint_enabled = true
}
resource "gcp_vertex_aiindexendpointdeployedindex" "deployed_index" {
deployed_index_id = "deployed_index"
display_name = "deployed_index"
region = "europe-west4"
index = gcp_vertex_aiindex.index.id
index_endpoint = gcp_vertex_aiindexendpoint.index_endpoint.id
automatic_resources = {
min_replica_count = 1
max_replica_count = 1
}
}
Vertex Ai Rag Corpus Secret Manager
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const secret = new gcp.secretmanager.Secret("secret", {
secretId: "secret-key",
replication: {
auto: {},
},
});
const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", {
secret: secret.id,
secretData: "secret-api-key",
});
const project = gcp.organizations.getProject({});
const secretAccessor = new gcp.secretmanager.SecretIamMember("secret_accessor", {
secretId: secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
});
const example = new gcp.vertex.AiRagCorpus("example", {
displayName: "rag-corpus-secret",
description: "A RAG corpus with Secret Manager",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
knn: {},
},
apiAuth: {
apiKeyConfig: {
apiKeySecretVersion: secretVersion.name,
},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
}, {
dependsOn: [secretAccessor],
});
import pulumi
import pulumi_gcp as gcp
secret = gcp.secretmanager.Secret("secret",
secret_id="secret-key",
replication={
"auto": {},
})
secret_version = gcp.secretmanager.SecretVersion("secret_version",
secret=secret.id,
secret_data="secret-api-key")
project = gcp.organizations.get_project()
secret_accessor = gcp.secretmanager.SecretIamMember("secret_accessor",
secret_id=secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com")
example = gcp.vertex.AiRagCorpus("example",
display_name="rag-corpus-secret",
description="A RAG corpus with Secret Manager",
region="europe-west4",
vector_db_config={
"rag_managed_db": {
"knn": {},
},
"api_auth": {
"api_key_config": {
"api_key_secret_version": secret_version.name,
},
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": f"projects/{project.number}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
opts = pulumi.ResourceOptions(depends_on=[secret_accessor]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/secretmanager"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/vertex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("secret-key"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
secretVersion, err := secretmanager.NewSecretVersion(ctx, "secret_version", &secretmanager.SecretVersionArgs{
Secret: secret.ID().ToIDOutput().ToStringOutput(),
SecretData: pulumi.String("secret-api-key"),
})
if err != nil {
return err
}
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
secretAccessor, err := secretmanager.NewSecretIamMember(ctx, "secret_accessor", &secretmanager.SecretIamMemberArgs{
SecretId: secret.ID().ToIDOutput().ToStringOutput(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = vertex.NewAiRagCorpus(ctx, "example", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-secret"),
Description: pulumi.String("A RAG corpus with Secret Manager"),
Region: pulumi.String("europe-west4"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
},
ApiAuth: &vertex.AiRagCorpusVectorDbConfigApiAuthArgs{
ApiKeyConfig: &vertex.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs{
ApiKeySecretVersion: secretVersion.Name,
},
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/text-embedding-005", project.Number),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
secretAccessor,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var secret = new Gcp.SecretManager.Secret("secret", new()
{
SecretId = "secret-key",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var secretVersion = new Gcp.SecretManager.SecretVersion("secret_version", new()
{
Secret = secret.Id,
SecretData = "secret-api-key",
});
var project = Gcp.Organizations.GetProject.Invoke();
var secretAccessor = new Gcp.SecretManager.SecretIamMember("secret_accessor", new()
{
SecretId = secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
});
var example = new Gcp.Vertex.AiRagCorpus("example", new()
{
DisplayName = "rag-corpus-secret",
Description = "A RAG corpus with Secret Manager",
Region = "europe-west4",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
{
Knn = null,
},
ApiAuth = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthArgs
{
ApiKeyConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs
{
ApiKeySecretVersion = secretVersion.Name,
},
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = $"projects/{project.Apply(getProjectResult => getProjectResult.Number)}/locations/europe-west4/publishers/google/models/text-embedding-005",
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
secretAccessor,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigApiAuthArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var secret = new Secret("secret", SecretArgs.builder()
.secretId("secret-key")
.replication(SecretReplicationArgs.builder()
.auto(SecretReplicationAutoArgs.builder()
.build())
.build())
.build());
var secretVersion = new SecretVersion("secretVersion", SecretVersionArgs.builder()
.secret(secret.id())
.secretData("secret-api-key")
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var secretAccessor = new SecretIamMember("secretAccessor", SecretIamMemberArgs.builder()
.secretId(secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
.build());
var example = new AiRagCorpus("example", AiRagCorpusArgs.builder()
.displayName("rag-corpus-secret")
.description("A RAG corpus with Secret Manager")
.region("europe-west4")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
.knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
.build())
.build())
.apiAuth(AiRagCorpusVectorDbConfigApiAuthArgs.builder()
.apiKeyConfig(AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs.builder()
.apiKeySecretVersion(secretVersion.name())
.build())
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint(String.format("projects/%s/locations/europe-west4/publishers/google/models/text-embedding-005", project.number()))
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(secretAccessor)
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagCorpus
properties:
displayName: rag-corpus-secret
description: A RAG corpus with Secret Manager
region: europe-west4
vectorDbConfig:
ragManagedDb:
knn: {}
apiAuth:
apiKeyConfig:
apiKeySecretVersion: ${secretVersion.name}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
options:
dependsOn:
- ${secretAccessor}
secret:
type: gcp:secretmanager:Secret
properties:
secretId: secret-key
replication:
auto: {}
secretVersion:
type: gcp:secretmanager:SecretVersion
name: secret_version
properties:
secret: ${secret.id}
secretData: secret-api-key
secretAccessor:
type: gcp:secretmanager:SecretIamMember
name: secret_accessor
properties:
secretId: ${secret.id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_getproject" "project" {
}
resource "gcp_vertex_airagcorpus" "example" {
depends_on = [gcp_secretmanager_secretiammember.secret_accessor]
display_name = "rag-corpus-secret"
description = "A RAG corpus with Secret Manager"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
knn = {}
}
api_auth = {
api_key_config = {
api_key_secret_version = gcp_secretmanager_secretversion.secret_version.name
}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_getproject.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
resource "gcp_secretmanager_secret" "secret" {
secret_id = "secret-key"
replication = {
auto = {}
}
}
resource "gcp_secretmanager_secretversion" "secret_version" {
secret = gcp_secretmanager_secret.secret.id
secret_data = "secret-api-key"
}
resource "gcp_secretmanager_secretiammember" "secret_accessor" {
secret_id = gcp_secretmanager_secret.secret.id
role = "roles/secretmanager.secretAccessor"
member ="serviceAccount:service-${data.gcp_organizations_getproject.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
}
Create AiRagCorpus Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiRagCorpus(name: string, args: AiRagCorpusArgs, opts?: CustomResourceOptions);@overload
def AiRagCorpus(resource_name: str,
args: AiRagCorpusArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiRagCorpus(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
region: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
encryption_spec: Optional[AiRagCorpusEncryptionSpecArgs] = None,
project: Optional[str] = None,
vector_db_config: Optional[AiRagCorpusVectorDbConfigArgs] = None,
vertex_ai_search_config: Optional[AiRagCorpusVertexAiSearchConfigArgs] = None)func NewAiRagCorpus(ctx *Context, name string, args AiRagCorpusArgs, opts ...ResourceOption) (*AiRagCorpus, error)public AiRagCorpus(string name, AiRagCorpusArgs args, CustomResourceOptions? opts = null)
public AiRagCorpus(String name, AiRagCorpusArgs args)
public AiRagCorpus(String name, AiRagCorpusArgs args, CustomResourceOptions options)
type: gcp:vertex:AiRagCorpus
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_vertex_ai_rag_corpus" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiRagCorpusArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AiRagCorpusArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AiRagCorpusArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiRagCorpusArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiRagCorpusArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var aiRagCorpusResource = new Gcp.Vertex.AiRagCorpus("aiRagCorpusResource", new()
{
DisplayName = "string",
Region = "string",
DeletionPolicy = "string",
Description = "string",
EncryptionSpec = new Gcp.Vertex.Inputs.AiRagCorpusEncryptionSpecArgs
{
KmsKeyName = "string",
},
Project = "string",
VectorDbConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigArgs
{
ApiAuth = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthArgs
{
ApiKeyConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs
{
ApiKeySecretVersion = "string",
ApiKeyString = "string",
},
},
Pinecone = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigPineconeArgs
{
IndexName = "string",
},
RagEmbeddingModelConfig = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
{
VertexPredictionEndpoint = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
{
Endpoint = "string",
Model = "string",
ModelVersionId = "string",
},
},
RagManagedDb = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbArgs
{
Ann = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigRagManagedDbAnnArgs
{
LeafCount = 0,
TreeDepth = 0,
},
Knn = null,
},
VertexVectorSearch = new Gcp.Vertex.Inputs.AiRagCorpusVectorDbConfigVertexVectorSearchArgs
{
Index = "string",
IndexEndpoint = "string",
},
},
VertexAiSearchConfig = new Gcp.Vertex.Inputs.AiRagCorpusVertexAiSearchConfigArgs
{
ServingConfig = "string",
},
});
example, err := vertex.NewAiRagCorpus(ctx, "aiRagCorpusResource", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("string"),
Region: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
Description: pulumi.String("string"),
EncryptionSpec: &vertex.AiRagCorpusEncryptionSpecArgs{
KmsKeyName: pulumi.String("string"),
},
Project: pulumi.String("string"),
VectorDbConfig: &vertex.AiRagCorpusVectorDbConfigArgs{
ApiAuth: &vertex.AiRagCorpusVectorDbConfigApiAuthArgs{
ApiKeyConfig: &vertex.AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs{
ApiKeySecretVersion: pulumi.String("string"),
ApiKeyString: pulumi.String("string"),
},
},
Pinecone: &vertex.AiRagCorpusVectorDbConfigPineconeArgs{
IndexName: pulumi.String("string"),
},
RagEmbeddingModelConfig: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs{
VertexPredictionEndpoint: &vertex.AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs{
Endpoint: pulumi.String("string"),
Model: pulumi.String("string"),
ModelVersionId: pulumi.String("string"),
},
},
RagManagedDb: &vertex.AiRagCorpusVectorDbConfigRagManagedDbArgs{
Ann: &vertex.AiRagCorpusVectorDbConfigRagManagedDbAnnArgs{
LeafCount: pulumi.Int(0),
TreeDepth: pulumi.Int(0),
},
Knn: &vertex.AiRagCorpusVectorDbConfigRagManagedDbKnnArgs{},
},
VertexVectorSearch: &vertex.AiRagCorpusVectorDbConfigVertexVectorSearchArgs{
Index: pulumi.String("string"),
IndexEndpoint: pulumi.String("string"),
},
},
VertexAiSearchConfig: &vertex.AiRagCorpusVertexAiSearchConfigArgs{
ServingConfig: pulumi.String("string"),
},
})
resource "gcp_vertex_ai_rag_corpus" "aiRagCorpusResource" {
lifecycle {
create_before_destroy = true
}
display_name = "string"
region = "string"
deletion_policy = "string"
description = "string"
encryption_spec = {
kms_key_name = "string"
}
project = "string"
vector_db_config = {
api_auth = {
api_key_config = {
api_key_secret_version = "string"
api_key_string = "string"
}
}
pinecone = {
index_name = "string"
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint = "string"
model = "string"
model_version_id = "string"
}
}
rag_managed_db = {
ann = {
leaf_count = 0
tree_depth = 0
}
knn = {}
}
vertex_vector_search = {
index = "string"
index_endpoint = "string"
}
}
vertex_ai_search_config = {
serving_config = "string"
}
}
var aiRagCorpusResource = new AiRagCorpus("aiRagCorpusResource", AiRagCorpusArgs.builder()
.displayName("string")
.region("string")
.deletionPolicy("string")
.description("string")
.encryptionSpec(AiRagCorpusEncryptionSpecArgs.builder()
.kmsKeyName("string")
.build())
.project("string")
.vectorDbConfig(AiRagCorpusVectorDbConfigArgs.builder()
.apiAuth(AiRagCorpusVectorDbConfigApiAuthArgs.builder()
.apiKeyConfig(AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs.builder()
.apiKeySecretVersion("string")
.apiKeyString("string")
.build())
.build())
.pinecone(AiRagCorpusVectorDbConfigPineconeArgs.builder()
.indexName("string")
.build())
.ragEmbeddingModelConfig(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs.builder()
.vertexPredictionEndpoint(AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs.builder()
.endpoint("string")
.model("string")
.modelVersionId("string")
.build())
.build())
.ragManagedDb(AiRagCorpusVectorDbConfigRagManagedDbArgs.builder()
.ann(AiRagCorpusVectorDbConfigRagManagedDbAnnArgs.builder()
.leafCount(0)
.treeDepth(0)
.build())
.knn(AiRagCorpusVectorDbConfigRagManagedDbKnnArgs.builder()
.build())
.build())
.vertexVectorSearch(AiRagCorpusVectorDbConfigVertexVectorSearchArgs.builder()
.index("string")
.indexEndpoint("string")
.build())
.build())
.vertexAiSearchConfig(AiRagCorpusVertexAiSearchConfigArgs.builder()
.servingConfig("string")
.build())
.build());
ai_rag_corpus_resource = gcp.vertex.AiRagCorpus("aiRagCorpusResource",
display_name="string",
region="string",
deletion_policy="string",
description="string",
encryption_spec={
"kms_key_name": "string",
},
project="string",
vector_db_config={
"api_auth": {
"api_key_config": {
"api_key_secret_version": "string",
"api_key_string": "string",
},
},
"pinecone": {
"index_name": "string",
},
"rag_embedding_model_config": {
"vertex_prediction_endpoint": {
"endpoint": "string",
"model": "string",
"model_version_id": "string",
},
},
"rag_managed_db": {
"ann": {
"leaf_count": 0,
"tree_depth": 0,
},
"knn": {},
},
"vertex_vector_search": {
"index": "string",
"index_endpoint": "string",
},
},
vertex_ai_search_config={
"serving_config": "string",
})
const aiRagCorpusResource = new gcp.vertex.AiRagCorpus("aiRagCorpusResource", {
displayName: "string",
region: "string",
deletionPolicy: "string",
description: "string",
encryptionSpec: {
kmsKeyName: "string",
},
project: "string",
vectorDbConfig: {
apiAuth: {
apiKeyConfig: {
apiKeySecretVersion: "string",
apiKeyString: "string",
},
},
pinecone: {
indexName: "string",
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: "string",
model: "string",
modelVersionId: "string",
},
},
ragManagedDb: {
ann: {
leafCount: 0,
treeDepth: 0,
},
knn: {},
},
vertexVectorSearch: {
index: "string",
indexEndpoint: "string",
},
},
vertexAiSearchConfig: {
servingConfig: "string",
},
});
type: gcp:vertex:AiRagCorpus
properties:
deletionPolicy: string
description: string
displayName: string
encryptionSpec:
kmsKeyName: string
project: string
region: string
vectorDbConfig:
apiAuth:
apiKeyConfig:
apiKeySecretVersion: string
apiKeyString: string
pinecone:
indexName: string
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: string
model: string
modelVersionId: string
ragManagedDb:
ann:
leafCount: 0
treeDepth: 0
knn: {}
vertexVectorSearch:
index: string
indexEndpoint: string
vertexAiSearchConfig:
servingConfig: string
AiRagCorpus Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AiRagCorpus resource accepts the following input properties:
- Display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- Region string
- The region of the RagCorpus. eg europe-west4
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- Optional. The description of the RagCorpus.
- Encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- Vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- Display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- Region string
- The region of the RagCorpus. eg europe-west4
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- Optional. The description of the RagCorpus.
- Encryption
Spec AiRag Corpus Encryption Spec Args - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Vector
Db AiConfig Rag Corpus Vector Db Config Args - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- Vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config Args - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- display_
name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- region string
- The region of the RagCorpus. eg europe-west4
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- Optional. The description of the RagCorpus.
- encryption_
spec object - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector_
db_ objectconfig - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex_
ai_ objectsearch_ config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- display
Name String - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- region String
- The region of the RagCorpus. eg europe-west4
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- Optional. The description of the RagCorpus.
- encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- region string
- The region of the RagCorpus. eg europe-west4
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- Optional. The description of the RagCorpus.
- encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- display_
name str - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- region str
- The region of the RagCorpus. eg europe-west4
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description str
- Optional. The description of the RagCorpus.
- encryption_
spec AiRag Corpus Encryption Spec Args - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector_
db_ Aiconfig Rag Corpus Vector Db Config Args - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex_
ai_ Aisearch_ config Rag Corpus Vertex Ai Search Config Args - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- display
Name String - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- region String
- The region of the RagCorpus. eg europe-west4
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- Optional. The description of the RagCorpus.
- encryption
Spec Property Map - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- vector
Db Property MapConfig - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai Property MapSearch Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiRagCorpus resource produces the following output properties:
- Corpus
Statuses List<AiRag Corpus Corpus Status> - Output only. RagCorpus state. Structure is documented below.
- Create
Time string - Output only. Timestamp when this RagCorpus was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- Update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- Corpus
Statuses []AiRag Corpus Corpus Status - Output only. RagCorpus state. Structure is documented below.
- Create
Time string - Output only. Timestamp when this RagCorpus was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- Update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- corpus_
statuses list(object) - Output only. RagCorpus state. Structure is documented below.
- create_
time string - Output only. Timestamp when this RagCorpus was created.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- update_
time string - Output only. Timestamp when this RagCorpus was last updated.
- corpus
Statuses List<AiRag Corpus Corpus Status> - Output only. RagCorpus state. Structure is documented below.
- create
Time String - Output only. Timestamp when this RagCorpus was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- update
Time String - Output only. Timestamp when this RagCorpus was last updated.
- corpus
Statuses AiRag Corpus Corpus Status[] - Output only. RagCorpus state. Structure is documented below.
- create
Time string - Output only. Timestamp when this RagCorpus was created.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- corpus_
statuses Sequence[AiRag Corpus Corpus Status] - Output only. RagCorpus state. Structure is documented below.
- create_
time str - Output only. Timestamp when this RagCorpus was created.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- update_
time str - Output only. Timestamp when this RagCorpus was last updated.
- corpus
Statuses List<Property Map> - Output only. RagCorpus state. Structure is documented below.
- create
Time String - Output only. Timestamp when this RagCorpus was created.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- update
Time String - Output only. Timestamp when this RagCorpus was last updated.
Look up Existing AiRagCorpus Resource
Get an existing AiRagCorpus resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AiRagCorpusState, opts?: CustomResourceOptions): AiRagCorpus@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
corpus_statuses: Optional[Sequence[AiRagCorpusCorpusStatusArgs]] = None,
create_time: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
encryption_spec: Optional[AiRagCorpusEncryptionSpecArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
update_time: Optional[str] = None,
vector_db_config: Optional[AiRagCorpusVectorDbConfigArgs] = None,
vertex_ai_search_config: Optional[AiRagCorpusVertexAiSearchConfigArgs] = None) -> AiRagCorpusfunc GetAiRagCorpus(ctx *Context, name string, id IDInput, state *AiRagCorpusState, opts ...ResourceOption) (*AiRagCorpus, error)public static AiRagCorpus Get(string name, Input<string> id, AiRagCorpusState? state, CustomResourceOptions? opts = null)public static AiRagCorpus get(String name, Output<String> id, AiRagCorpusState state, CustomResourceOptions options)resources: _: type: gcp:vertex:AiRagCorpus get: id: ${id}import {
to = gcp_vertex_ai_rag_corpus.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Corpus
Statuses List<AiRag Corpus Corpus Status> - Output only. RagCorpus state. Structure is documented below.
- Create
Time string - Output only. Timestamp when this RagCorpus was created.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- Optional. The description of the RagCorpus.
- Display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- Encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- Name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the RagCorpus. eg europe-west4
- Update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- Vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- Vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- Corpus
Statuses []AiRag Corpus Corpus Status Args - Output only. RagCorpus state. Structure is documented below.
- Create
Time string - Output only. Timestamp when this RagCorpus was created.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Description string
- Optional. The description of the RagCorpus.
- Display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- Encryption
Spec AiRag Corpus Encryption Spec Args - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- Name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
- The region of the RagCorpus. eg europe-west4
- Update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- Vector
Db AiConfig Rag Corpus Vector Db Config Args - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- Vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config Args - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- corpus_
statuses list(object) - Output only. RagCorpus state. Structure is documented below.
- create_
time string - Output only. Timestamp when this RagCorpus was created.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- Optional. The description of the RagCorpus.
- display_
name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- encryption_
spec object - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of the RagCorpus. eg europe-west4
- update_
time string - Output only. Timestamp when this RagCorpus was last updated.
- vector_
db_ objectconfig - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex_
ai_ objectsearch_ config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- corpus
Statuses List<AiRag Corpus Corpus Status> - Output only. RagCorpus state. Structure is documented below.
- create
Time String - Output only. Timestamp when this RagCorpus was created.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- Optional. The description of the RagCorpus.
- display
Name String - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- name String
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the RagCorpus. eg europe-west4
- update
Time String - Output only. Timestamp when this RagCorpus was last updated.
- vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- corpus
Statuses AiRag Corpus Corpus Status[] - Output only. RagCorpus state. Structure is documented below.
- create
Time string - Output only. Timestamp when this RagCorpus was created.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description string
- Optional. The description of the RagCorpus.
- display
Name string - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- encryption
Spec AiRag Corpus Encryption Spec - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- name string
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
- The region of the RagCorpus. eg europe-west4
- update
Time string - Output only. Timestamp when this RagCorpus was last updated.
- vector
Db AiConfig Rag Corpus Vector Db Config - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai AiSearch Config Rag Corpus Vertex Ai Search Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- corpus_
statuses Sequence[AiRag Corpus Corpus Status Args] - Output only. RagCorpus state. Structure is documented below.
- create_
time str - Output only. Timestamp when this RagCorpus was created.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description str
- Optional. The description of the RagCorpus.
- display_
name str - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- encryption_
spec AiRag Corpus Encryption Spec Args - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- name str
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
- The region of the RagCorpus. eg europe-west4
- update_
time str - Output only. Timestamp when this RagCorpus was last updated.
- vector_
db_ Aiconfig Rag Corpus Vector Db Config Args - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex_
ai_ Aisearch_ config Rag Corpus Vertex Ai Search Config Args - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
- corpus
Statuses List<Property Map> - Output only. RagCorpus state. Structure is documented below.
- create
Time String - Output only. Timestamp when this RagCorpus was created.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- description String
- Optional. The description of the RagCorpus.
- display
Name String - Required. The display name of the RagCorpus. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- encryption
Spec Property Map - Optional. Immutable. The CMEK key name used to encrypt at-rest data related to this corpus. Only applicable to RagManagedDb option for Vector DB. This field can only be set at corpus creation time, and cannot be updated or deleted. Structure is documented below.
- name String
- The generated name of the RagCorpus, in the format projects/{project}/locations/{location}/ragCorpora/{rag_corpus}.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region String
- The region of the RagCorpus. eg europe-west4
- update
Time String - Output only. Timestamp when this RagCorpus was last updated.
- vector
Db Property MapConfig - Optional. Immutable. The config for the RAG-managed Vector DB. Structure is documented below.
- vertex
Ai Property MapSearch Config - Optional. Immutable. The config for the Vertex AI Search. Structure is documented below.
Supporting Types
AiRagCorpusCorpusStatus, AiRagCorpusCorpusStatusArgs
- Error
Status string - (Output) Output only. Only populated when the state is ERROR.
- State string
- (Output) Output only. RagCorpus life state.
- Error
Status string - (Output) Output only. Only populated when the state is ERROR.
- State string
- (Output) Output only. RagCorpus life state.
- error_
status string - (Output) Output only. Only populated when the state is ERROR.
- state string
- (Output) Output only. RagCorpus life state.
- error
Status String - (Output) Output only. Only populated when the state is ERROR.
- state String
- (Output) Output only. RagCorpus life state.
- error
Status string - (Output) Output only. Only populated when the state is ERROR.
- state string
- (Output) Output only. RagCorpus life state.
- error_
status str - (Output) Output only. Only populated when the state is ERROR.
- state str
- (Output) Output only. RagCorpus life state.
- error
Status String - (Output) Output only. Only populated when the state is ERROR.
- state String
- (Output) Output only. RagCorpus life state.
AiRagCorpusEncryptionSpec, AiRagCorpusEncryptionSpecArgs
- Kms
Key stringName - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- Kms
Key stringName - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- kms_
key_ stringname - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- kms
Key StringName - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- kms
Key stringName - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- kms_
key_ strname - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
- kms
Key StringName - Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect the resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the resource is created.
AiRagCorpusVectorDbConfig, AiRagCorpusVectorDbConfigArgs
- Api
Auth AiRag Corpus Vector Db Config Api Auth - Authentication config for the chosen Vector DB. Structure is documented below.
- Pinecone
Ai
Rag Corpus Vector Db Config Pinecone - The config for the Pinecone. Structure is documented below.
- Rag
Embedding AiModel Config Rag Corpus Vector Db Config Rag Embedding Model Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- Rag
Managed AiDb Rag Corpus Vector Db Config Rag Managed Db - The config for the default RAG-managed Vector DB. Structure is documented below.
- Vertex
Vector AiSearch Rag Corpus Vector Db Config Vertex Vector Search - The config for the Vertex Vector Search. Structure is documented below.
- Api
Auth AiRag Corpus Vector Db Config Api Auth - Authentication config for the chosen Vector DB. Structure is documented below.
- Pinecone
Ai
Rag Corpus Vector Db Config Pinecone - The config for the Pinecone. Structure is documented below.
- Rag
Embedding AiModel Config Rag Corpus Vector Db Config Rag Embedding Model Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- Rag
Managed AiDb Rag Corpus Vector Db Config Rag Managed Db - The config for the default RAG-managed Vector DB. Structure is documented below.
- Vertex
Vector AiSearch Rag Corpus Vector Db Config Vertex Vector Search - The config for the Vertex Vector Search. Structure is documented below.
- api_
auth object - Authentication config for the chosen Vector DB. Structure is documented below.
- pinecone object
- The config for the Pinecone. Structure is documented below.
- rag_
embedding_ objectmodel_ config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- rag_
managed_ objectdb - The config for the default RAG-managed Vector DB. Structure is documented below.
- vertex_
vector_ objectsearch - The config for the Vertex Vector Search. Structure is documented below.
- api
Auth AiRag Corpus Vector Db Config Api Auth - Authentication config for the chosen Vector DB. Structure is documented below.
- pinecone
Ai
Rag Corpus Vector Db Config Pinecone - The config for the Pinecone. Structure is documented below.
- rag
Embedding AiModel Config Rag Corpus Vector Db Config Rag Embedding Model Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- rag
Managed AiDb Rag Corpus Vector Db Config Rag Managed Db - The config for the default RAG-managed Vector DB. Structure is documented below.
- vertex
Vector AiSearch Rag Corpus Vector Db Config Vertex Vector Search - The config for the Vertex Vector Search. Structure is documented below.
- api
Auth AiRag Corpus Vector Db Config Api Auth - Authentication config for the chosen Vector DB. Structure is documented below.
- pinecone
Ai
Rag Corpus Vector Db Config Pinecone - The config for the Pinecone. Structure is documented below.
- rag
Embedding AiModel Config Rag Corpus Vector Db Config Rag Embedding Model Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- rag
Managed AiDb Rag Corpus Vector Db Config Rag Managed Db - The config for the default RAG-managed Vector DB. Structure is documented below.
- vertex
Vector AiSearch Rag Corpus Vector Db Config Vertex Vector Search - The config for the Vertex Vector Search. Structure is documented below.
- api_
auth AiRag Corpus Vector Db Config Api Auth - Authentication config for the chosen Vector DB. Structure is documented below.
- pinecone
Ai
Rag Corpus Vector Db Config Pinecone - The config for the Pinecone. Structure is documented below.
- rag_
embedding_ Aimodel_ config Rag Corpus Vector Db Config Rag Embedding Model Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- rag_
managed_ Aidb Rag Corpus Vector Db Config Rag Managed Db - The config for the default RAG-managed Vector DB. Structure is documented below.
- vertex_
vector_ Aisearch Rag Corpus Vector Db Config Vertex Vector Search - The config for the Vertex Vector Search. Structure is documented below.
- api
Auth Property Map - Authentication config for the chosen Vector DB. Structure is documented below.
- pinecone Property Map
- The config for the Pinecone. Structure is documented below.
- rag
Embedding Property MapModel Config - Optional. Immutable. The embedding model config of the Vector DB. Structure is documented below.
- rag
Managed Property MapDb - The config for the default RAG-managed Vector DB. Structure is documented below.
- vertex
Vector Property MapSearch - The config for the Vertex Vector Search. Structure is documented below.
AiRagCorpusVectorDbConfigApiAuth, AiRagCorpusVectorDbConfigApiAuthArgs
- Api
Key AiConfig Rag Corpus Vector Db Config Api Auth Api Key Config - The API secret. Structure is documented below.
- Api
Key AiConfig Rag Corpus Vector Db Config Api Auth Api Key Config - The API secret. Structure is documented below.
- api_
key_ objectconfig - The API secret. Structure is documented below.
- api
Key AiConfig Rag Corpus Vector Db Config Api Auth Api Key Config - The API secret. Structure is documented below.
- api
Key AiConfig Rag Corpus Vector Db Config Api Auth Api Key Config - The API secret. Structure is documented below.
- api_
key_ Aiconfig Rag Corpus Vector Db Config Api Auth Api Key Config - The API secret. Structure is documented below.
- api
Key Property MapConfig - The API secret. Structure is documented below.
AiRagCorpusVectorDbConfigApiAuthApiKeyConfig, AiRagCorpusVectorDbConfigApiAuthApiKeyConfigArgs
- Api
Key stringSecret Version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- Api
Key stringString - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- Api
Key stringSecret Version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- Api
Key stringString - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- api_
key_ stringsecret_ version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- api_
key_ stringstring - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- api
Key StringSecret Version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- api
Key StringString - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- api
Key stringSecret Version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- api
Key stringString - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- api_
key_ strsecret_ version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- api_
key_ strstring - The API key string. Note: This property is sensitive and will not be displayed in the plan.
- api
Key StringSecret Version - The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
- api
Key StringString - The API key string. Note: This property is sensitive and will not be displayed in the plan.
AiRagCorpusVectorDbConfigPinecone, AiRagCorpusVectorDbConfigPineconeArgs
- Index
Name string - Pinecone index name. This value cannot be changed after it's set.
- Index
Name string - Pinecone index name. This value cannot be changed after it's set.
- index_
name string - Pinecone index name. This value cannot be changed after it's set.
- index
Name String - Pinecone index name. This value cannot be changed after it's set.
- index
Name string - Pinecone index name. This value cannot be changed after it's set.
- index_
name str - Pinecone index name. This value cannot be changed after it's set.
- index
Name String - Pinecone index name. This value cannot be changed after it's set.
AiRagCorpusVectorDbConfigRagEmbeddingModelConfig, AiRagCorpusVectorDbConfigRagEmbeddingModelConfigArgs
- Vertex
Prediction AiEndpoint Rag Corpus Vector Db Config Rag Embedding Model Config Vertex Prediction Endpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- Vertex
Prediction AiEndpoint Rag Corpus Vector Db Config Rag Embedding Model Config Vertex Prediction Endpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- vertex_
prediction_ objectendpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- vertex
Prediction AiEndpoint Rag Corpus Vector Db Config Rag Embedding Model Config Vertex Prediction Endpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- vertex
Prediction AiEndpoint Rag Corpus Vector Db Config Rag Embedding Model Config Vertex Prediction Endpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- vertex_
prediction_ Aiendpoint Rag Corpus Vector Db Config Rag Embedding Model Config Vertex Prediction Endpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
- vertex
Prediction Property MapEndpoint - The Vertex AI Prediction Endpoint used for dense vector search. Structure is documented below.
AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpoint, AiRagCorpusVectorDbConfigRagEmbeddingModelConfigVertexPredictionEndpointArgs
- Endpoint string
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- Model string
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- Model
Version stringId - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- Endpoint string
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- Model string
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- Model
Version stringId - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- endpoint string
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- model string
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- model_
version_ stringid - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- endpoint String
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- model String
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- model
Version StringId - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- endpoint string
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- model string
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- model
Version stringId - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- endpoint str
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- model str
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- model_
version_ strid - (Output) Output only. Version ID of the model that is deployed on the endpoint.
- endpoint String
- Required. The endpoint resource name. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} or projects/{project}/locations/{location}/endpoints/{endpoint}.
- model String
- (Output) Output only. The resource name of the model that is deployed on the endpoint.
- model
Version StringId - (Output) Output only. Version ID of the model that is deployed on the endpoint.
AiRagCorpusVectorDbConfigRagManagedDb, AiRagCorpusVectorDbConfigRagManagedDbArgs
- Ann
Ai
Rag Corpus Vector Db Config Rag Managed Db Ann - Performs an ANN search on RagCorpus. Structure is documented below.
- Knn
Ai
Rag Corpus Vector Db Config Rag Managed Db Knn - Performs a KNN search on RagCorpus. This is the default choice if not specified.
- Ann
Ai
Rag Corpus Vector Db Config Rag Managed Db Ann - Performs an ANN search on RagCorpus. Structure is documented below.
- Knn
Ai
Rag Corpus Vector Db Config Rag Managed Db Knn - Performs a KNN search on RagCorpus. This is the default choice if not specified.
- ann
Ai
Rag Corpus Vector Db Config Rag Managed Db Ann - Performs an ANN search on RagCorpus. Structure is documented below.
- knn
Ai
Rag Corpus Vector Db Config Rag Managed Db Knn - Performs a KNN search on RagCorpus. This is the default choice if not specified.
- ann
Ai
Rag Corpus Vector Db Config Rag Managed Db Ann - Performs an ANN search on RagCorpus. Structure is documented below.
- knn
Ai
Rag Corpus Vector Db Config Rag Managed Db Knn - Performs a KNN search on RagCorpus. This is the default choice if not specified.
- ann
Ai
Rag Corpus Vector Db Config Rag Managed Db Ann - Performs an ANN search on RagCorpus. Structure is documented below.
- knn
Ai
Rag Corpus Vector Db Config Rag Managed Db Knn - Performs a KNN search on RagCorpus. This is the default choice if not specified.
- ann Property Map
- Performs an ANN search on RagCorpus. Structure is documented below.
- knn Property Map
- Performs a KNN search on RagCorpus. This is the default choice if not specified.
AiRagCorpusVectorDbConfigRagManagedDbAnn, AiRagCorpusVectorDbConfigRagManagedDbAnnArgs
- leaf_
count number - Number of leaf nodes in the tree-based structure. Default value is 500.
- tree_
depth number - The depth of the tree-based structure. Only depth values of 2 and 3 are supported. Default value is 2.
- leaf_
count int - Number of leaf nodes in the tree-based structure. Default value is 500.
- tree_
depth int - The depth of the tree-based structure. Only depth values of 2 and 3 are supported. Default value is 2.
AiRagCorpusVectorDbConfigVertexVectorSearch, AiRagCorpusVectorDbConfigVertexVectorSearchArgs
- Index string
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- Index
Endpoint string - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- Index string
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- Index
Endpoint string - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- index string
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- index_
endpoint string - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- index String
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- index
Endpoint String - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- index string
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- index
Endpoint string - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- index str
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- index_
endpoint str - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- index String
- The resource name of the Index. Format: projects/{project}/locations/{location}/indexes/{index}
- index
Endpoint String - The resource name of the Index Endpoint. Format: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
AiRagCorpusVertexAiSearchConfig, AiRagCorpusVertexAiSearchConfigArgs
- Serving
Config string - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- Serving
Config string - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- serving_
config string - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- serving
Config String - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- serving
Config string - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- serving_
config str - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
- serving
Config String - Vertex AI Search Serving Config resource full name. For example, projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} or projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}.
Import
RagCorpus can be imported using any of these accepted formats:
projects/{{project}}/locations/{{region}}/ragCorpora/{{name}}{{project}}/{{region}}/{{name}}{{region}}/{{name}}{{name}}
When using the pulumi import command, RagCorpus can be imported using one of the formats above. For example:
$ pulumi import gcp:vertex/aiRagCorpus:AiRagCorpus default projects/{{project}}/locations/{{region}}/ragCorpora/{{name}}
$ pulumi import gcp:vertex/aiRagCorpus:AiRagCorpus default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:vertex/aiRagCorpus:AiRagCorpus default {{region}}/{{name}}
$ pulumi import gcp:vertex/aiRagCorpus:AiRagCorpus default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Monday, Oct 5, 2026 by Pulumi