published on Wednesday, Nov 18, 2026 by Pulumi
published on Wednesday, Nov 18, 2026 by Pulumi
A RagFile is a single file that has been imported into a Vertex AI RAG Engine RagCorpus, where it is parsed, chunked, embedded, and indexed.
Each gcp.vertex.AiRagFile imports exactly one file from either
Cloud Storage or Google Drive using the ragFiles:import method.
Note: The RAG Engine service agent (
service-PROJECT_NUMBER@gcp-sa-vertex-rag.iam.gserviceaccount.com) must be able to read the source file. If the source file content already exists in the RagCorpus, the import is skipped by the API and resource creation fails.
To get more information about RagFile, see:
- API documentation
- How-to Guides
Example Usage
Vertex Ai Rag File Gcs
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
displayName: "rag-corpus-file",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
knn: {},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
});
const bucket = new gcp.storage.Bucket("bucket", {
name: "tf-test-rag-file",
location: "EUROPE-WEST4",
uniformBucketLevelAccess: true,
forceDestroy: true,
});
const file = new gcp.storage.BucketObject("file", {
name: "example.txt",
bucket: bucket.name,
content: "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
bucket: bucket.name,
role: "roles/storage.objectViewer",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
}, {
dependsOn: [ragCorpus],
});
const example = new gcp.vertex.AiRagFile("example", {
region: "europe-west4",
ragCorpus: ragCorpus.name,
gcsSource: {
uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
},
}, {
dependsOn: [ragServiceAgent],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
display_name="rag-corpus-file",
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",
},
},
})
bucket = gcp.storage.Bucket("bucket",
name="tf-test-rag-file",
location="EUROPE-WEST4",
uniform_bucket_level_access=True,
force_destroy=True)
file = gcp.storage.BucketObject("file",
name="example.txt",
bucket=bucket.name,
content="Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
bucket=bucket.name,
role="roles/storage.objectViewer",
member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
example = gcp.vertex.AiRagFile("example",
region="europe-west4",
rag_corpus=rag_corpus.name,
gcs_source={
"uris": pulumi.Output.all(
bucketName=bucket.name,
fileName=file.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
,
},
opts = pulumi.ResourceOptions(depends_on=[rag_service_agent]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
"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
}
ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-file"),
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
}
bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
Name: pulumi.String("tf-test-rag-file"),
Location: pulumi.String("EUROPE-WEST4"),
UniformBucketLevelAccess: pulumi.Bool(true),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
Name: pulumi.String("example.txt"),
Bucket: bucket.Name,
Content: pulumi.String("Vertex AI RAG Engine lets large language models retrieve information from your own documents."),
})
if err != nil {
return err
}
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
Bucket: bucket.Name,
Role: pulumi.String("roles/storage.objectViewer"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
}, pulumi.DependsOn([]pulumi.Resource{
ragCorpus,
}))
if err != nil {
return err
}
_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
Region: pulumi.String("europe-west4"),
RagCorpus: ragCorpus.Name,
GcsSource: &vertex.AiRagFileGcsSourceArgs{
Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
bucketName := _args[0].(string)
fileName := _args[1].(string)
return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
}).(pulumi.StringOutput),
},
}, pulumi.DependsOn([]pulumi.Resource{
ragServiceAgent,
}))
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 ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
{
DisplayName = "rag-corpus-file",
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",
},
},
},
});
var bucket = new Gcp.Storage.Bucket("bucket", new()
{
Name = "tf-test-rag-file",
Location = "EUROPE-WEST4",
UniformBucketLevelAccess = true,
ForceDestroy = true,
});
var file = new Gcp.Storage.BucketObject("file", new()
{
Name = "example.txt",
Bucket = bucket.Name,
Content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
{
Bucket = bucket.Name,
Role = "roles/storage.objectViewer",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
}, new CustomResourceOptions
{
DependsOn =
{
ragCorpus,
},
});
var example = new Gcp.Vertex.AiRagFile("example", new()
{
Region = "europe-west4",
RagCorpus = ragCorpus.Name,
GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
{
Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
{
var bucketName = values.Item1;
var fileName = values.Item2;
return $"gs://{bucketName}/{fileName}";
}),
},
}, new CustomResourceOptions
{
DependsOn =
{
ragServiceAgent,
},
});
});
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 com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.storage.BucketIAMMember;
import com.pulumi.gcp.storage.BucketIAMMemberArgs;
import com.pulumi.gcp.vertex.AiRagFile;
import com.pulumi.gcp.vertex.AiRagFileArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
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) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
.displayName("rag-corpus-file")
.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());
var bucket = new Bucket("bucket", BucketArgs.builder()
.name("tf-test-rag-file")
.location("EUROPE-WEST4")
.uniformBucketLevelAccess(true)
.forceDestroy(true)
.build());
var file = new BucketObject("file", BucketObjectArgs.builder()
.name("example.txt")
.bucket(bucket.name())
.content("Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
.build());
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
.bucket(bucket.name())
.role("roles/storage.objectViewer")
.member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
.build(), CustomResourceOptions.builder()
.dependsOn(ragCorpus)
.build());
var example = new AiRagFile("example", AiRagFileArgs.builder()
.region("europe-west4")
.ragCorpus(ragCorpus.name())
.gcsSource(AiRagFileGcsSourceArgs.builder()
.uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
var bucketName = values.t1;
var fileName = values.t2;
return String.format("gs://%s/%s", bucketName,fileName);
}))
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(ragServiceAgent)
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagFile
properties:
region: europe-west4
ragCorpus: ${ragCorpus.name}
gcsSource:
uris: gs://${bucket.name}/${file.name}
options:
dependsOn:
- ${ragServiceAgent}
ragCorpus:
type: gcp:vertex:AiRagCorpus
name: rag_corpus
properties:
displayName: rag-corpus-file
region: europe-west4
vectorDbConfig:
ragManagedDb:
knn: {}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
bucket:
type: gcp:storage:Bucket
properties:
name: tf-test-rag-file
location: EUROPE-WEST4
uniformBucketLevelAccess: true
forceDestroy: true
file:
type: gcp:storage:BucketObject
properties:
name: example.txt
bucket: ${bucket.name}
content: Vertex AI RAG Engine lets large language models retrieve information from your own documents.
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
ragServiceAgent:
type: gcp:storage:BucketIAMMember
name: rag_service_agent
properties:
bucket: ${bucket.name}
role: roles/storage.objectViewer
member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
options:
dependsOn:
- ${ragCorpus}
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_project" "project" {
}
resource "gcp_vertex_ai_rag_file" "example" {
depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent]
lifecycle {
create_before_destroy = true
}
region = "europe-west4"
rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
gcs_source = {
uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
}
}
resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
lifecycle {
create_before_destroy = true
}
display_name = "rag-corpus-file"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
knn = {}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
resource "gcp_storage_bucket" "bucket" {
lifecycle {
create_before_destroy = true
}
name = "tf-test-rag-file"
location = "EUROPE-WEST4"
uniform_bucket_level_access = true
force_destroy = true
}
resource "gcp_storage_bucket_object" "file" {
lifecycle {
create_before_destroy = true
}
name = "example.txt"
bucket = gcp_storage_bucket.bucket.name
content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents."
}
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
lifecycle {
create_before_destroy = true
}
bucket = gcp_storage_bucket.bucket.name
role = "roles/storage.objectViewer"
member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
}
Vertex Ai Rag File Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
displayName: "rag-corpus-file-full",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
knn: {},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
});
const bucket = new gcp.storage.Bucket("bucket", {
name: "tf-test-rag-file-full",
location: "EUROPE-WEST4",
uniformBucketLevelAccess: true,
forceDestroy: true,
});
const file = new gcp.storage.BucketObject("file", {
name: "example.txt",
bucket: bucket.name,
content: "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
bucket: bucket.name,
role: "roles/storage.objectViewer",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
}, {
dependsOn: [ragCorpus],
});
const example = new gcp.vertex.AiRagFile("example", {
region: "europe-west4",
ragCorpus: ragCorpus.name,
gcsSource: {
uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
},
ragFileParsingConfig: {
llmParser: {
modelName: project.then(project => `projects/${project.projectId}/locations/europe-west4/publishers/google/models/gemini-2.5-flash`),
maxParsingRequestsPerMin: 100,
customParsingPrompt: "Extract the text content of the document.",
},
},
ragFileTransformationConfig: {
ragFileChunkingConfig: {
fixedLengthChunking: {
chunkSize: 512,
chunkOverlap: 100,
},
},
},
maxEmbeddingRequestsPerMin: 500,
}, {
dependsOn: [ragServiceAgent],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
display_name="rag-corpus-file-full",
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",
},
},
})
bucket = gcp.storage.Bucket("bucket",
name="tf-test-rag-file-full",
location="EUROPE-WEST4",
uniform_bucket_level_access=True,
force_destroy=True)
file = gcp.storage.BucketObject("file",
name="example.txt",
bucket=bucket.name,
content="Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
bucket=bucket.name,
role="roles/storage.objectViewer",
member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
example = gcp.vertex.AiRagFile("example",
region="europe-west4",
rag_corpus=rag_corpus.name,
gcs_source={
"uris": pulumi.Output.all(
bucketName=bucket.name,
fileName=file.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
,
},
rag_file_parsing_config={
"llm_parser": {
"model_name": f"projects/{project.project_id}/locations/europe-west4/publishers/google/models/gemini-2.5-flash",
"max_parsing_requests_per_min": 100,
"custom_parsing_prompt": "Extract the text content of the document.",
},
},
rag_file_transformation_config={
"rag_file_chunking_config": {
"fixed_length_chunking": {
"chunk_size": 512,
"chunk_overlap": 100,
},
},
},
max_embedding_requests_per_min=500,
opts = pulumi.ResourceOptions(depends_on=[rag_service_agent]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
"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
}
ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-file-full"),
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
}
bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
Name: pulumi.String("tf-test-rag-file-full"),
Location: pulumi.String("EUROPE-WEST4"),
UniformBucketLevelAccess: pulumi.Bool(true),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
Name: pulumi.String("example.txt"),
Bucket: bucket.Name,
Content: pulumi.String("Vertex AI RAG Engine lets large language models retrieve information from your own documents."),
})
if err != nil {
return err
}
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
Bucket: bucket.Name,
Role: pulumi.String("roles/storage.objectViewer"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
}, pulumi.DependsOn([]pulumi.Resource{
ragCorpus,
}))
if err != nil {
return err
}
_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
Region: pulumi.String("europe-west4"),
RagCorpus: ragCorpus.Name,
GcsSource: &vertex.AiRagFileGcsSourceArgs{
Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
bucketName := _args[0].(string)
fileName := _args[1].(string)
return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
}).(pulumi.StringOutput),
},
RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
LlmParser: &vertex.AiRagFileRagFileParsingConfigLlmParserArgs{
ModelName: pulumi.Sprintf("projects/%v/locations/europe-west4/publishers/google/models/gemini-2.5-flash", project.ProjectId),
MaxParsingRequestsPerMin: pulumi.Int(100),
CustomParsingPrompt: pulumi.String("Extract the text content of the document."),
},
},
RagFileTransformationConfig: &vertex.AiRagFileRagFileTransformationConfigArgs{
RagFileChunkingConfig: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs{
FixedLengthChunking: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs{
ChunkSize: pulumi.Int(512),
ChunkOverlap: pulumi.Int(100),
},
},
},
MaxEmbeddingRequestsPerMin: pulumi.Int(500),
}, pulumi.DependsOn([]pulumi.Resource{
ragServiceAgent,
}))
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 ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
{
DisplayName = "rag-corpus-file-full",
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",
},
},
},
});
var bucket = new Gcp.Storage.Bucket("bucket", new()
{
Name = "tf-test-rag-file-full",
Location = "EUROPE-WEST4",
UniformBucketLevelAccess = true,
ForceDestroy = true,
});
var file = new Gcp.Storage.BucketObject("file", new()
{
Name = "example.txt",
Bucket = bucket.Name,
Content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents.",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
{
Bucket = bucket.Name,
Role = "roles/storage.objectViewer",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
}, new CustomResourceOptions
{
DependsOn =
{
ragCorpus,
},
});
var example = new Gcp.Vertex.AiRagFile("example", new()
{
Region = "europe-west4",
RagCorpus = ragCorpus.Name,
GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
{
Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
{
var bucketName = values.Item1;
var fileName = values.Item2;
return $"gs://{bucketName}/{fileName}";
}),
},
RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
{
LlmParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLlmParserArgs
{
ModelName = $"projects/{project.Apply(getProjectResult => getProjectResult.ProjectId)}/locations/europe-west4/publishers/google/models/gemini-2.5-flash",
MaxParsingRequestsPerMin = 100,
CustomParsingPrompt = "Extract the text content of the document.",
},
},
RagFileTransformationConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigArgs
{
RagFileChunkingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs
{
FixedLengthChunking = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs
{
ChunkSize = 512,
ChunkOverlap = 100,
},
},
},
MaxEmbeddingRequestsPerMin = 500,
}, new CustomResourceOptions
{
DependsOn =
{
ragServiceAgent,
},
});
});
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 com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.storage.BucketIAMMember;
import com.pulumi.gcp.storage.BucketIAMMemberArgs;
import com.pulumi.gcp.vertex.AiRagFile;
import com.pulumi.gcp.vertex.AiRagFileArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigLlmParserArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs;
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) {
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
.displayName("rag-corpus-file-full")
.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());
var bucket = new Bucket("bucket", BucketArgs.builder()
.name("tf-test-rag-file-full")
.location("EUROPE-WEST4")
.uniformBucketLevelAccess(true)
.forceDestroy(true)
.build());
var file = new BucketObject("file", BucketObjectArgs.builder()
.name("example.txt")
.bucket(bucket.name())
.content("Vertex AI RAG Engine lets large language models retrieve information from your own documents.")
.build());
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
.bucket(bucket.name())
.role("roles/storage.objectViewer")
.member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
.build(), CustomResourceOptions.builder()
.dependsOn(ragCorpus)
.build());
var example = new AiRagFile("example", AiRagFileArgs.builder()
.region("europe-west4")
.ragCorpus(ragCorpus.name())
.gcsSource(AiRagFileGcsSourceArgs.builder()
.uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
var bucketName = values.t1;
var fileName = values.t2;
return String.format("gs://%s/%s", bucketName,fileName);
}))
.build())
.ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
.llmParser(AiRagFileRagFileParsingConfigLlmParserArgs.builder()
.modelName(String.format("projects/%s/locations/europe-west4/publishers/google/models/gemini-2.5-flash", project.projectId()))
.maxParsingRequestsPerMin(100)
.customParsingPrompt("Extract the text content of the document.")
.build())
.build())
.ragFileTransformationConfig(AiRagFileRagFileTransformationConfigArgs.builder()
.ragFileChunkingConfig(AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs.builder()
.fixedLengthChunking(AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs.builder()
.chunkSize(512)
.chunkOverlap(100)
.build())
.build())
.build())
.maxEmbeddingRequestsPerMin(500)
.build(), CustomResourceOptions.builder()
.dependsOn(ragServiceAgent)
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagFile
properties:
region: europe-west4
ragCorpus: ${ragCorpus.name}
gcsSource:
uris: gs://${bucket.name}/${file.name}
ragFileParsingConfig:
llmParser:
modelName: projects/${project.projectId}/locations/europe-west4/publishers/google/models/gemini-2.5-flash
maxParsingRequestsPerMin: 100
customParsingPrompt: Extract the text content of the document.
ragFileTransformationConfig:
ragFileChunkingConfig:
fixedLengthChunking:
chunkSize: 512
chunkOverlap: 100
maxEmbeddingRequestsPerMin: 500
options:
dependsOn:
- ${ragServiceAgent}
ragCorpus:
type: gcp:vertex:AiRagCorpus
name: rag_corpus
properties:
displayName: rag-corpus-file-full
region: europe-west4
vectorDbConfig:
ragManagedDb:
knn: {}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
bucket:
type: gcp:storage:Bucket
properties:
name: tf-test-rag-file-full
location: EUROPE-WEST4
uniformBucketLevelAccess: true
forceDestroy: true
file:
type: gcp:storage:BucketObject
properties:
name: example.txt
bucket: ${bucket.name}
content: Vertex AI RAG Engine lets large language models retrieve information from your own documents.
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
ragServiceAgent:
type: gcp:storage:BucketIAMMember
name: rag_service_agent
properties:
bucket: ${bucket.name}
role: roles/storage.objectViewer
member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
options:
dependsOn:
- ${ragCorpus}
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_project" "project" {
}
resource "gcp_vertex_ai_rag_file" "example" {
depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent]
lifecycle {
create_before_destroy = true
}
region = "europe-west4"
rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
gcs_source = {
uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
}
rag_file_parsing_config = {
llm_parser = {
model_name ="projects/${data.gcp_organizations_project.project.project_id}/locations/europe-west4/publishers/google/models/gemini-2.5-flash"
max_parsing_requests_per_min = 100
custom_parsing_prompt = "Extract the text content of the document."
}
}
rag_file_transformation_config = {
rag_file_chunking_config = {
fixed_length_chunking = {
chunk_size = 512
chunk_overlap = 100
}
}
}
max_embedding_requests_per_min = 500
}
resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
lifecycle {
create_before_destroy = true
}
display_name = "rag-corpus-file-full"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
knn = {}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
resource "gcp_storage_bucket" "bucket" {
lifecycle {
create_before_destroy = true
}
name = "tf-test-rag-file-full"
location = "EUROPE-WEST4"
uniform_bucket_level_access = true
force_destroy = true
}
resource "gcp_storage_bucket_object" "file" {
lifecycle {
create_before_destroy = true
}
name = "example.txt"
bucket = gcp_storage_bucket.bucket.name
content = "Vertex AI RAG Engine lets large language models retrieve information from your own documents."
}
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
lifecycle {
create_before_destroy = true
}
bucket = gcp_storage_bucket.bucket.name
role = "roles/storage.objectViewer"
member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
}
Vertex Ai Rag File Layout Parser
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const layoutParser = new gcp.essentialcontacts.DocumentAiProcessor("layout_parser", {
location: "eu",
displayName: "rag-layout-parser",
type: "LAYOUT_PARSER_PROCESSOR",
});
const project = gcp.organizations.getProject({});
const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
displayName: "rag-corpus-file-layout",
region: "europe-west4",
vectorDbConfig: {
ragManagedDb: {
knn: {},
},
ragEmbeddingModelConfig: {
vertexPredictionEndpoint: {
endpoint: project.then(project => `projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005`),
},
},
},
});
const bucket = new gcp.storage.Bucket("bucket", {
name: "tf-test-rag-file-layout",
location: "EUROPE-WEST4",
uniformBucketLevelAccess: true,
forceDestroy: true,
});
const file = new gcp.storage.BucketObject("file", {
name: "example.html",
bucket: bucket.name,
contentType: "text/html",
content: "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
const ragServiceAgent = new gcp.storage.BucketIAMMember("rag_service_agent", {
bucket: bucket.name,
role: "roles/storage.objectViewer",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
}, {
dependsOn: [ragCorpus],
});
const ragServiceAgentDocumentAi = new gcp.projects.IAMMember("rag_service_agent_document_ai", {
project: project.then(project => project.projectId),
role: "roles/documentai.apiUser",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com`),
}, {
dependsOn: [ragCorpus],
});
const example = new gcp.vertex.AiRagFile("example", {
region: "europe-west4",
ragCorpus: ragCorpus.name,
gcsSource: {
uris: pulumi.interpolate`gs://${bucket.name}/${file.name}`,
},
ragFileParsingConfig: {
layoutParser: {
processorName: layoutParser.id,
maxParsingRequestsPerMin: 100,
},
},
}, {
dependsOn: [
ragServiceAgent,
ragServiceAgentDocumentAi,
],
});
import pulumi
import pulumi_gcp as gcp
layout_parser = gcp.essentialcontacts.DocumentAiProcessor("layout_parser",
location="eu",
display_name="rag-layout-parser",
type="LAYOUT_PARSER_PROCESSOR")
project = gcp.organizations.get_project()
rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
display_name="rag-corpus-file-layout",
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",
},
},
})
bucket = gcp.storage.Bucket("bucket",
name="tf-test-rag-file-layout",
location="EUROPE-WEST4",
uniform_bucket_level_access=True,
force_destroy=True)
file = gcp.storage.BucketObject("file",
name="example.html",
bucket=bucket.name,
content_type="text/html",
content="<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>")
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
rag_service_agent = gcp.storage.BucketIAMMember("rag_service_agent",
bucket=bucket.name,
role="roles/storage.objectViewer",
member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
rag_service_agent_document_ai = gcp.projects.IAMMember("rag_service_agent_document_ai",
project=project.project_id,
role="roles/documentai.apiUser",
member=f"serviceAccount:service-{project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
opts = pulumi.ResourceOptions(depends_on=[rag_corpus]))
example = gcp.vertex.AiRagFile("example",
region="europe-west4",
rag_corpus=rag_corpus.name,
gcs_source={
"uris": pulumi.Output.all(
bucketName=bucket.name,
fileName=file.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucketName']}/{resolved_outputs['fileName']}")
,
},
rag_file_parsing_config={
"layout_parser": {
"processor_name": layout_parser.id,
"max_parsing_requests_per_min": 100,
},
},
opts = pulumi.ResourceOptions(depends_on=[
rag_service_agent,
rag_service_agent_document_ai,
]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/essentialcontacts"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/projects"
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/storage"
"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 {
layoutParser, err := essentialcontacts.NewDocumentAiProcessor(ctx, "layout_parser", &essentialcontacts.DocumentAiProcessorArgs{
Location: pulumi.String("eu"),
DisplayName: pulumi.String("rag-layout-parser"),
Type: pulumi.String("LAYOUT_PARSER_PROCESSOR"),
})
if err != nil {
return err
}
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-file-layout"),
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
}
bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
Name: pulumi.String("tf-test-rag-file-layout"),
Location: pulumi.String("EUROPE-WEST4"),
UniformBucketLevelAccess: pulumi.Bool(true),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
file, err := storage.NewBucketObject(ctx, "file", &storage.BucketObjectArgs{
Name: pulumi.String("example.html"),
Bucket: bucket.Name,
ContentType: pulumi.String("text/html"),
Content: pulumi.String("<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>"),
})
if err != nil {
return err
}
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
ragServiceAgent, err := storage.NewBucketIAMMember(ctx, "rag_service_agent", &storage.BucketIAMMemberArgs{
Bucket: bucket.Name,
Role: pulumi.String("roles/storage.objectViewer"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
}, pulumi.DependsOn([]pulumi.Resource{
ragCorpus,
}))
if err != nil {
return err
}
ragServiceAgentDocumentAi, err := projects.NewIAMMember(ctx, "rag_service_agent_document_ai", &projects.IAMMemberArgs{
Project: pulumi.String(project.ProjectId),
Role: pulumi.String("roles/documentai.apiUser"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.Number),
}, pulumi.DependsOn([]pulumi.Resource{
ragCorpus,
}))
if err != nil {
return err
}
_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
Region: pulumi.String("europe-west4"),
RagCorpus: ragCorpus.Name,
GcsSource: &vertex.AiRagFileGcsSourceArgs{
Uris: pulumi.All(bucket.Name, file.Name).ApplyT(func(_args []interface{}) (string, error) {
bucketName := _args[0].(string)
fileName := _args[1].(string)
return fmt.Sprintf("gs://%v/%v", bucketName, fileName), nil
}).(pulumi.StringOutput),
},
RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
LayoutParser: &vertex.AiRagFileRagFileParsingConfigLayoutParserArgs{
ProcessorName: layoutParser.ID(),
MaxParsingRequestsPerMin: pulumi.Int(100),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
ragServiceAgent,
ragServiceAgentDocumentAi,
}))
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 layoutParser = new Gcp.EssentialContacts.DocumentAiProcessor("layout_parser", new()
{
Location = "eu",
DisplayName = "rag-layout-parser",
Type = "LAYOUT_PARSER_PROCESSOR",
});
var project = Gcp.Organizations.GetProject.Invoke();
var ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
{
DisplayName = "rag-corpus-file-layout",
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",
},
},
},
});
var bucket = new Gcp.Storage.Bucket("bucket", new()
{
Name = "tf-test-rag-file-layout",
Location = "EUROPE-WEST4",
UniformBucketLevelAccess = true,
ForceDestroy = true,
});
var file = new Gcp.Storage.BucketObject("file", new()
{
Name = "example.html",
Bucket = bucket.Name,
ContentType = "text/html",
Content = "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>",
});
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new Gcp.Storage.BucketIAMMember("rag_service_agent", new()
{
Bucket = bucket.Name,
Role = "roles/storage.objectViewer",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
}, new CustomResourceOptions
{
DependsOn =
{
ragCorpus,
},
});
var ragServiceAgentDocumentAi = new Gcp.Projects.IAMMember("rag_service_agent_document_ai", new()
{
Project = project.Apply(getProjectResult => getProjectResult.ProjectId),
Role = "roles/documentai.apiUser",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-vertex-rag.iam.gserviceaccount.com",
}, new CustomResourceOptions
{
DependsOn =
{
ragCorpus,
},
});
var example = new Gcp.Vertex.AiRagFile("example", new()
{
Region = "europe-west4",
RagCorpus = ragCorpus.Name,
GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
{
Uris = Output.Tuple(bucket.Name, file.Name).Apply(values =>
{
var bucketName = values.Item1;
var fileName = values.Item2;
return $"gs://{bucketName}/{fileName}";
}),
},
RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
{
LayoutParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLayoutParserArgs
{
ProcessorName = layoutParser.Id,
MaxParsingRequestsPerMin = 100,
},
},
}, new CustomResourceOptions
{
DependsOn =
{
ragServiceAgent,
ragServiceAgentDocumentAi,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.essentialcontacts.DocumentAiProcessor;
import com.pulumi.gcp.essentialcontacts.DocumentAiProcessorArgs;
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 com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.storage.BucketIAMMember;
import com.pulumi.gcp.storage.BucketIAMMemberArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.gcp.vertex.AiRagFile;
import com.pulumi.gcp.vertex.AiRagFileArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileGcsSourceArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileRagFileParsingConfigLayoutParserArgs;
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 layoutParser = new DocumentAiProcessor("layoutParser", DocumentAiProcessorArgs.builder()
.location("eu")
.displayName("rag-layout-parser")
.type("LAYOUT_PARSER_PROCESSOR")
.build());
final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
.displayName("rag-corpus-file-layout")
.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());
var bucket = new Bucket("bucket", BucketArgs.builder()
.name("tf-test-rag-file-layout")
.location("EUROPE-WEST4")
.uniformBucketLevelAccess(true)
.forceDestroy(true)
.build());
var file = new BucketObject("file", BucketObjectArgs.builder()
.name("example.html")
.bucket(bucket.name())
.contentType("text/html")
.content("<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>")
.build());
// The RAG Engine service agent is created on first use of RAG Engine, so grant it
// access after the RagCorpus exists.
var ragServiceAgent = new BucketIAMMember("ragServiceAgent", BucketIAMMemberArgs.builder()
.bucket(bucket.name())
.role("roles/storage.objectViewer")
.member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
.build(), CustomResourceOptions.builder()
.dependsOn(ragCorpus)
.build());
var ragServiceAgentDocumentAi = new IAMMember("ragServiceAgentDocumentAi", IAMMemberArgs.builder()
.project(project.projectId())
.role("roles/documentai.apiUser")
.member(String.format("serviceAccount:service-%s@gcp-sa-vertex-rag.iam.gserviceaccount.com", project.number()))
.build(), CustomResourceOptions.builder()
.dependsOn(ragCorpus)
.build());
var example = new AiRagFile("example", AiRagFileArgs.builder()
.region("europe-west4")
.ragCorpus(ragCorpus.name())
.gcsSource(AiRagFileGcsSourceArgs.builder()
.uris(Output.tuple(bucket.name(), file.name()).applyValue(values -> {
var bucketName = values.t1;
var fileName = values.t2;
return String.format("gs://%s/%s", bucketName,fileName);
}))
.build())
.ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
.layoutParser(AiRagFileRagFileParsingConfigLayoutParserArgs.builder()
.processorName(layoutParser.id())
.maxParsingRequestsPerMin(100)
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(
ragServiceAgent,
ragServiceAgentDocumentAi)
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagFile
properties:
region: europe-west4
ragCorpus: ${ragCorpus.name}
gcsSource:
uris: gs://${bucket.name}/${file.name}
ragFileParsingConfig:
layoutParser:
processorName: ${layoutParser.id}
maxParsingRequestsPerMin: 100
options:
dependsOn:
- ${ragServiceAgent}
- ${ragServiceAgentDocumentAi}
layoutParser:
type: gcp:essentialcontacts:DocumentAiProcessor
name: layout_parser
properties:
location: eu
displayName: rag-layout-parser
type: LAYOUT_PARSER_PROCESSOR
ragCorpus:
type: gcp:vertex:AiRagCorpus
name: rag_corpus
properties:
displayName: rag-corpus-file-layout
region: europe-west4
vectorDbConfig:
ragManagedDb:
knn: {}
ragEmbeddingModelConfig:
vertexPredictionEndpoint:
endpoint: projects/${project.number}/locations/europe-west4/publishers/google/models/text-embedding-005
bucket:
type: gcp:storage:Bucket
properties:
name: tf-test-rag-file-layout
location: EUROPE-WEST4
uniformBucketLevelAccess: true
forceDestroy: true
file:
type: gcp:storage:BucketObject
properties:
name: example.html
bucket: ${bucket.name}
contentType: text/html
content: <html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
ragServiceAgent:
type: gcp:storage:BucketIAMMember
name: rag_service_agent
properties:
bucket: ${bucket.name}
role: roles/storage.objectViewer
member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
options:
dependsOn:
- ${ragCorpus}
ragServiceAgentDocumentAi:
type: gcp:projects:IAMMember
name: rag_service_agent_document_ai
properties:
project: ${project.projectId}
role: roles/documentai.apiUser
member: serviceAccount:service-${project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com
options:
dependsOn:
- ${ragCorpus}
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_organizations_project" "project" {
}
resource "gcp_vertex_ai_rag_file" "example" {
depends_on = [gcp_storage_bucket_i_a_m_member.rag_service_agent, gcp_projects_i_a_m_member.rag_service_agent_document_ai]
lifecycle {
create_before_destroy = true
}
region = "europe-west4"
rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
gcs_source = {
uris ="gs://${gcp_storage_bucket.bucket.name}/${gcp_storage_bucket_object.file.name}"
}
rag_file_parsing_config = {
layout_parser = {
processor_name = gcp_essentialcontacts_document_ai_processor.layout_parser.id
max_parsing_requests_per_min = 100
}
}
}
resource "gcp_essentialcontacts_document_ai_processor" "layout_parser" {
lifecycle {
create_before_destroy = true
}
location = "eu"
display_name = "rag-layout-parser"
type = "LAYOUT_PARSER_PROCESSOR"
}
resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
lifecycle {
create_before_destroy = true
}
display_name = "rag-corpus-file-layout"
region = "europe-west4"
vector_db_config = {
rag_managed_db = {
knn = {}
}
rag_embedding_model_config = {
vertex_prediction_endpoint = {
endpoint ="projects/${data.gcp_organizations_project.project.number}/locations/europe-west4/publishers/google/models/text-embedding-005"
}
}
}
}
resource "gcp_storage_bucket" "bucket" {
lifecycle {
create_before_destroy = true
}
name = "tf-test-rag-file-layout"
location = "EUROPE-WEST4"
uniform_bucket_level_access = true
force_destroy = true
}
resource "gcp_storage_bucket_object" "file" {
lifecycle {
create_before_destroy = true
}
name = "example.html"
bucket = gcp_storage_bucket.bucket.name
content_type = "text/html"
content = "<html><body><h1>Vertex AI RAG Engine</h1><p>RAG Engine lets large language models retrieve information from your own documents.</p></body></html>"
}
# The RAG Engine service agent is created on first use of RAG Engine, so grant it
# access after the RagCorpus exists.
resource "gcp_storage_bucket_i_a_m_member" "rag_service_agent" {
depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
lifecycle {
create_before_destroy = true
}
bucket = gcp_storage_bucket.bucket.name
role = "roles/storage.objectViewer"
member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
}
resource "gcp_projects_i_a_m_member" "rag_service_agent_document_ai" {
depends_on = [gcp_vertex_ai_rag_corpus.rag_corpus]
lifecycle {
create_before_destroy = true
}
project = data.gcp_organizations_project.project.project_id
role = "roles/documentai.apiUser"
member ="serviceAccount:service-${data.gcp_organizations_project.project.number}@gcp-sa-vertex-rag.iam.gserviceaccount.com"
}
Vertex Ai Rag File Google Drive
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const ragCorpus = new gcp.vertex.AiRagCorpus("rag_corpus", {
displayName: "rag-corpus-drive",
region: "europe-west4",
});
const example = new gcp.vertex.AiRagFile("example", {
region: "europe-west4",
ragCorpus: ragCorpus.name,
googleDriveSource: {
resourceIds: {
resourceId: "GOOGLE_DRIVE_FILE_ID",
resourceType: "RESOURCE_TYPE_FILE",
},
},
});
import pulumi
import pulumi_gcp as gcp
rag_corpus = gcp.vertex.AiRagCorpus("rag_corpus",
display_name="rag-corpus-drive",
region="europe-west4")
example = gcp.vertex.AiRagFile("example",
region="europe-west4",
rag_corpus=rag_corpus.name,
google_drive_source={
"resource_ids": {
"resource_id": "GOOGLE_DRIVE_FILE_ID",
"resource_type": "RESOURCE_TYPE_FILE",
},
})
package main
import (
"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 {
ragCorpus, err := vertex.NewAiRagCorpus(ctx, "rag_corpus", &vertex.AiRagCorpusArgs{
DisplayName: pulumi.String("rag-corpus-drive"),
Region: pulumi.String("europe-west4"),
})
if err != nil {
return err
}
_, err = vertex.NewAiRagFile(ctx, "example", &vertex.AiRagFileArgs{
Region: pulumi.String("europe-west4"),
RagCorpus: ragCorpus.Name,
GoogleDriveSource: &vertex.AiRagFileGoogleDriveSourceArgs{
ResourceIds: &vertex.AiRagFileGoogleDriveSourceResourceIdsArgs{
ResourceId: pulumi.String("GOOGLE_DRIVE_FILE_ID"),
ResourceType: pulumi.String("RESOURCE_TYPE_FILE"),
},
},
})
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 ragCorpus = new Gcp.Vertex.AiRagCorpus("rag_corpus", new()
{
DisplayName = "rag-corpus-drive",
Region = "europe-west4",
});
var example = new Gcp.Vertex.AiRagFile("example", new()
{
Region = "europe-west4",
RagCorpus = ragCorpus.Name,
GoogleDriveSource = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceArgs
{
ResourceIds = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceResourceIdsArgs
{
ResourceId = "GOOGLE_DRIVE_FILE_ID",
ResourceType = "RESOURCE_TYPE_FILE",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vertex.AiRagCorpus;
import com.pulumi.gcp.vertex.AiRagCorpusArgs;
import com.pulumi.gcp.vertex.AiRagFile;
import com.pulumi.gcp.vertex.AiRagFileArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileGoogleDriveSourceArgs;
import com.pulumi.gcp.vertex.inputs.AiRagFileGoogleDriveSourceResourceIdsArgs;
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 ragCorpus = new AiRagCorpus("ragCorpus", AiRagCorpusArgs.builder()
.displayName("rag-corpus-drive")
.region("europe-west4")
.build());
var example = new AiRagFile("example", AiRagFileArgs.builder()
.region("europe-west4")
.ragCorpus(ragCorpus.name())
.googleDriveSource(AiRagFileGoogleDriveSourceArgs.builder()
.resourceIds(AiRagFileGoogleDriveSourceResourceIdsArgs.builder()
.resourceId("GOOGLE_DRIVE_FILE_ID")
.resourceType("RESOURCE_TYPE_FILE")
.build())
.build())
.build());
}
}
resources:
example:
type: gcp:vertex:AiRagFile
properties:
region: europe-west4
ragCorpus: ${ragCorpus.name}
googleDriveSource:
resourceIds:
resourceId: GOOGLE_DRIVE_FILE_ID
resourceType: RESOURCE_TYPE_FILE
ragCorpus:
type: gcp:vertex:AiRagCorpus
name: rag_corpus
properties:
displayName: rag-corpus-drive
region: europe-west4
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_vertex_ai_rag_file" "example" {
lifecycle {
create_before_destroy = true
}
region = "europe-west4"
rag_corpus = gcp_vertex_ai_rag_corpus.rag_corpus.name
google_drive_source = {
resource_ids = {
resource_id = "GOOGLE_DRIVE_FILE_ID"
resource_type = "RESOURCE_TYPE_FILE"
}
}
}
resource "gcp_vertex_ai_rag_corpus" "rag_corpus" {
lifecycle {
create_before_destroy = true
}
display_name = "rag-corpus-drive"
region = "europe-west4"
}
Create AiRagFile Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiRagFile(name: string, args: AiRagFileArgs, opts?: CustomResourceOptions);@overload
def AiRagFile(resource_name: str,
args: AiRagFileArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiRagFile(resource_name: str,
opts: Optional[ResourceOptions] = None,
rag_corpus: Optional[str] = None,
region: Optional[str] = None,
deletion_policy: Optional[str] = None,
gcs_source: Optional[AiRagFileGcsSourceArgs] = None,
google_drive_source: Optional[AiRagFileGoogleDriveSourceArgs] = None,
max_embedding_requests_per_min: Optional[int] = None,
project: Optional[str] = None,
rag_file_parsing_config: Optional[AiRagFileRagFileParsingConfigArgs] = None,
rag_file_transformation_config: Optional[AiRagFileRagFileTransformationConfigArgs] = None)func NewAiRagFile(ctx *Context, name string, args AiRagFileArgs, opts ...ResourceOption) (*AiRagFile, error)public AiRagFile(string name, AiRagFileArgs args, CustomResourceOptions? opts = null)
public AiRagFile(String name, AiRagFileArgs args)
public AiRagFile(String name, AiRagFileArgs args, CustomResourceOptions options)
type: gcp:vertex:AiRagFile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_vertex_ai_rag_file" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiRagFileArgs
- 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 AiRagFileArgs
- 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 AiRagFileArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiRagFileArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiRagFileArgs
- 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 aiRagFileResource = new Gcp.Vertex.AiRagFile("aiRagFileResource", new()
{
RagCorpus = "string",
Region = "string",
DeletionPolicy = "string",
GcsSource = new Gcp.Vertex.Inputs.AiRagFileGcsSourceArgs
{
Uris = "string",
},
GoogleDriveSource = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceArgs
{
ResourceIds = new Gcp.Vertex.Inputs.AiRagFileGoogleDriveSourceResourceIdsArgs
{
ResourceId = "string",
ResourceType = "string",
},
},
MaxEmbeddingRequestsPerMin = 0,
Project = "string",
RagFileParsingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigArgs
{
LayoutParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLayoutParserArgs
{
MaxParsingRequestsPerMin = 0,
ProcessorName = "string",
},
LlmParser = new Gcp.Vertex.Inputs.AiRagFileRagFileParsingConfigLlmParserArgs
{
CustomParsingPrompt = "string",
MaxParsingRequestsPerMin = 0,
ModelName = "string",
},
},
RagFileTransformationConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigArgs
{
RagFileChunkingConfig = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs
{
FixedLengthChunking = new Gcp.Vertex.Inputs.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs
{
ChunkOverlap = 0,
ChunkSize = 0,
},
},
},
});
example, err := vertex.NewAiRagFile(ctx, "aiRagFileResource", &vertex.AiRagFileArgs{
RagCorpus: pulumi.String("string"),
Region: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
GcsSource: &vertex.AiRagFileGcsSourceArgs{
Uris: pulumi.String("string"),
},
GoogleDriveSource: &vertex.AiRagFileGoogleDriveSourceArgs{
ResourceIds: &vertex.AiRagFileGoogleDriveSourceResourceIdsArgs{
ResourceId: pulumi.String("string"),
ResourceType: pulumi.String("string"),
},
},
MaxEmbeddingRequestsPerMin: pulumi.Int(0),
Project: pulumi.String("string"),
RagFileParsingConfig: &vertex.AiRagFileRagFileParsingConfigArgs{
LayoutParser: &vertex.AiRagFileRagFileParsingConfigLayoutParserArgs{
MaxParsingRequestsPerMin: pulumi.Int(0),
ProcessorName: pulumi.String("string"),
},
LlmParser: &vertex.AiRagFileRagFileParsingConfigLlmParserArgs{
CustomParsingPrompt: pulumi.String("string"),
MaxParsingRequestsPerMin: pulumi.Int(0),
ModelName: pulumi.String("string"),
},
},
RagFileTransformationConfig: &vertex.AiRagFileRagFileTransformationConfigArgs{
RagFileChunkingConfig: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs{
FixedLengthChunking: &vertex.AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs{
ChunkOverlap: pulumi.Int(0),
ChunkSize: pulumi.Int(0),
},
},
},
})
resource "gcp_vertex_ai_rag_file" "aiRagFileResource" {
lifecycle {
create_before_destroy = true
}
rag_corpus = "string"
region = "string"
deletion_policy = "string"
gcs_source = {
uris = "string"
}
google_drive_source = {
resource_ids = {
resource_id = "string"
resource_type = "string"
}
}
max_embedding_requests_per_min = 0
project = "string"
rag_file_parsing_config = {
layout_parser = {
max_parsing_requests_per_min = 0
processor_name = "string"
}
llm_parser = {
custom_parsing_prompt = "string"
max_parsing_requests_per_min = 0
model_name = "string"
}
}
rag_file_transformation_config = {
rag_file_chunking_config = {
fixed_length_chunking = {
chunk_overlap = 0
chunk_size = 0
}
}
}
}
var aiRagFileResource = new AiRagFile("aiRagFileResource", AiRagFileArgs.builder()
.ragCorpus("string")
.region("string")
.deletionPolicy("string")
.gcsSource(AiRagFileGcsSourceArgs.builder()
.uris("string")
.build())
.googleDriveSource(AiRagFileGoogleDriveSourceArgs.builder()
.resourceIds(AiRagFileGoogleDriveSourceResourceIdsArgs.builder()
.resourceId("string")
.resourceType("string")
.build())
.build())
.maxEmbeddingRequestsPerMin(0)
.project("string")
.ragFileParsingConfig(AiRagFileRagFileParsingConfigArgs.builder()
.layoutParser(AiRagFileRagFileParsingConfigLayoutParserArgs.builder()
.maxParsingRequestsPerMin(0)
.processorName("string")
.build())
.llmParser(AiRagFileRagFileParsingConfigLlmParserArgs.builder()
.customParsingPrompt("string")
.maxParsingRequestsPerMin(0)
.modelName("string")
.build())
.build())
.ragFileTransformationConfig(AiRagFileRagFileTransformationConfigArgs.builder()
.ragFileChunkingConfig(AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs.builder()
.fixedLengthChunking(AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs.builder()
.chunkOverlap(0)
.chunkSize(0)
.build())
.build())
.build())
.build());
ai_rag_file_resource = gcp.vertex.AiRagFile("aiRagFileResource",
rag_corpus="string",
region="string",
deletion_policy="string",
gcs_source={
"uris": "string",
},
google_drive_source={
"resource_ids": {
"resource_id": "string",
"resource_type": "string",
},
},
max_embedding_requests_per_min=0,
project="string",
rag_file_parsing_config={
"layout_parser": {
"max_parsing_requests_per_min": 0,
"processor_name": "string",
},
"llm_parser": {
"custom_parsing_prompt": "string",
"max_parsing_requests_per_min": 0,
"model_name": "string",
},
},
rag_file_transformation_config={
"rag_file_chunking_config": {
"fixed_length_chunking": {
"chunk_overlap": 0,
"chunk_size": 0,
},
},
})
const aiRagFileResource = new gcp.vertex.AiRagFile("aiRagFileResource", {
ragCorpus: "string",
region: "string",
deletionPolicy: "string",
gcsSource: {
uris: "string",
},
googleDriveSource: {
resourceIds: {
resourceId: "string",
resourceType: "string",
},
},
maxEmbeddingRequestsPerMin: 0,
project: "string",
ragFileParsingConfig: {
layoutParser: {
maxParsingRequestsPerMin: 0,
processorName: "string",
},
llmParser: {
customParsingPrompt: "string",
maxParsingRequestsPerMin: 0,
modelName: "string",
},
},
ragFileTransformationConfig: {
ragFileChunkingConfig: {
fixedLengthChunking: {
chunkOverlap: 0,
chunkSize: 0,
},
},
},
});
type: gcp:vertex:AiRagFile
properties:
deletionPolicy: string
gcsSource:
uris: string
googleDriveSource:
resourceIds:
resourceId: string
resourceType: string
maxEmbeddingRequestsPerMin: 0
project: string
ragCorpus: string
ragFileParsingConfig:
layoutParser:
maxParsingRequestsPerMin: 0
processorName: string
llmParser:
customParsingPrompt: string
maxParsingRequestsPerMin: 0
modelName: string
ragFileTransformationConfig:
ragFileChunkingConfig:
fixedLengthChunking:
chunkOverlap: 0
chunkSize: 0
region: string
AiRagFile 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 AiRagFile resource accepts the following input properties:
- Rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- Gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- Google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- Max
Embedding intRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- Rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- Rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- Gcs
Source AiRag File Gcs Source Args - The Cloud Storage location of the file to import. Structure is documented below.
- Google
Drive AiSource Rag File Google Drive Source Args - The Google Drive location of the file to import. Structure is documented below.
- Max
Embedding intRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rag
File AiParsing Config Rag File Rag File Parsing Config Args - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- Rag
File AiTransformation Config Rag File Rag File Transformation Config Args - The transformation config used when importing the file. Structure is documented below.
- rag_
corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- gcs_
source object - The Cloud Storage location of the file to import. Structure is documented below.
- google_
drive_ objectsource - The Google Drive location of the file to import. Structure is documented below.
- max_
embedding_ numberrequests_ per_ min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag_
file_ objectparsing_ config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag_
file_ objecttransformation_ config - The transformation config used when importing the file. Structure is documented below.
- rag
Corpus String - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding IntegerRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding numberRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- rag_
corpus str - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- gcs_
source AiRag File Gcs Source Args - The Cloud Storage location of the file to import. Structure is documented below.
- google_
drive_ Aisource Rag File Google Drive Source Args - The Google Drive location of the file to import. Structure is documented below.
- max_
embedding_ intrequests_ per_ min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag_
file_ Aiparsing_ config Rag File Rag File Parsing Config Args - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag_
file_ Aitransformation_ config Rag File Rag File Transformation Config Args - The transformation config used when importing the file. Structure is documented below.
- rag
Corpus String - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - 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.
- gcs
Source Property Map - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive Property MapSource - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding NumberRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
File Property MapParsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File Property MapTransformation Config - The transformation config used when importing the file. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiRagFile resource produces the following output properties:
- Create
Time string - Timestamp when this RagFile was created.
- Description string
- The description of the RagFile.
- Display
Name string - The display name of the RagFile, derived by the API from the source file.
- File
Statuses List<AiRag File File Status> - State of the RagFile. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The generated ID of the RagFile.
- Update
Time string - Timestamp when this RagFile was last updated.
- User
Metadata string - The metadata for metadata search, in JSON format.
- Create
Time string - Timestamp when this RagFile was created.
- Description string
- The description of the RagFile.
- Display
Name string - The display name of the RagFile, derived by the API from the source file.
- File
Statuses []AiRag File File Status - State of the RagFile. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The generated ID of the RagFile.
- Update
Time string - Timestamp when this RagFile was last updated.
- User
Metadata string - The metadata for metadata search, in JSON format.
- create_
time string - Timestamp when this RagFile was created.
- description string
- The description of the RagFile.
- display_
name string - The display name of the RagFile, derived by the API from the source file.
- file_
statuses list(object) - State of the RagFile. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The generated ID of the RagFile.
- update_
time string - Timestamp when this RagFile was last updated.
- user_
metadata string - The metadata for metadata search, in JSON format.
- create
Time String - Timestamp when this RagFile was created.
- description String
- The description of the RagFile.
- display
Name String - The display name of the RagFile, derived by the API from the source file.
- file
Statuses List<AiRag File File Status> - State of the RagFile. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The generated ID of the RagFile.
- update
Time String - Timestamp when this RagFile was last updated.
- user
Metadata String - The metadata for metadata search, in JSON format.
- create
Time string - Timestamp when this RagFile was created.
- description string
- The description of the RagFile.
- display
Name string - The display name of the RagFile, derived by the API from the source file.
- file
Statuses AiRag File File Status[] - State of the RagFile. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The generated ID of the RagFile.
- update
Time string - Timestamp when this RagFile was last updated.
- user
Metadata string - The metadata for metadata search, in JSON format.
- create_
time str - Timestamp when this RagFile was created.
- description str
- The description of the RagFile.
- display_
name str - The display name of the RagFile, derived by the API from the source file.
- file_
statuses Sequence[AiRag File File Status] - State of the RagFile. Structure is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The generated ID of the RagFile.
- update_
time str - Timestamp when this RagFile was last updated.
- user_
metadata str - The metadata for metadata search, in JSON format.
- create
Time String - Timestamp when this RagFile was created.
- description String
- The description of the RagFile.
- display
Name String - The display name of the RagFile, derived by the API from the source file.
- file
Statuses List<Property Map> - State of the RagFile. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The generated ID of the RagFile.
- update
Time String - Timestamp when this RagFile was last updated.
- user
Metadata String - The metadata for metadata search, in JSON format.
Look up Existing AiRagFile Resource
Get an existing AiRagFile 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?: AiRagFileState, opts?: CustomResourceOptions): AiRagFile@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
file_statuses: Optional[Sequence[AiRagFileFileStatusArgs]] = None,
gcs_source: Optional[AiRagFileGcsSourceArgs] = None,
google_drive_source: Optional[AiRagFileGoogleDriveSourceArgs] = None,
max_embedding_requests_per_min: Optional[int] = None,
name: Optional[str] = None,
project: Optional[str] = None,
rag_corpus: Optional[str] = None,
rag_file_parsing_config: Optional[AiRagFileRagFileParsingConfigArgs] = None,
rag_file_transformation_config: Optional[AiRagFileRagFileTransformationConfigArgs] = None,
region: Optional[str] = None,
update_time: Optional[str] = None,
user_metadata: Optional[str] = None) -> AiRagFilefunc GetAiRagFile(ctx *Context, name string, id IDInput, state *AiRagFileState, opts ...ResourceOption) (*AiRagFile, error)public static AiRagFile Get(string name, Input<string> id, AiRagFileState? state, CustomResourceOptions? opts = null)public static AiRagFile get(String name, Output<String> id, AiRagFileState state, CustomResourceOptions options)resources: existingAiRagFile: type: gcp:vertex:AiRagFile get: id: ${id}import {
to = gcp_vertex_ai_rag_file.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state AiRagFileState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state AiRagFileState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state AiRagFileState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state AiRagFileState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Create
Time string - Timestamp when this RagFile 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
- The description of the RagFile.
- Display
Name string - The display name of the RagFile, derived by the API from the source file.
- File
Statuses List<AiRag File File Status> - State of the RagFile. Structure is documented below.
- Gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- Google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- Max
Embedding intRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- Name string
- The generated ID of the RagFile.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - Rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- Rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- Region string
- The region of the RagCorpus. eg europe-west4
- Update
Time string - Timestamp when this RagFile was last updated.
- User
Metadata string - The metadata for metadata search, in JSON format.
- Create
Time string - Timestamp when this RagFile 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
- The description of the RagFile.
- Display
Name string - The display name of the RagFile, derived by the API from the source file.
- File
Statuses []AiRag File File Status Args - State of the RagFile. Structure is documented below.
- Gcs
Source AiRag File Gcs Source Args - The Cloud Storage location of the file to import. Structure is documented below.
- Google
Drive AiSource Rag File Google Drive Source Args - The Google Drive location of the file to import. Structure is documented below.
- Max
Embedding intRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- Name string
- The generated ID of the RagFile.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - Rag
File AiParsing Config Rag File Rag File Parsing Config Args - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- Rag
File AiTransformation Config Rag File Rag File Transformation Config Args - The transformation config used when importing the file. Structure is documented below.
- Region string
- The region of the RagCorpus. eg europe-west4
- Update
Time string - Timestamp when this RagFile was last updated.
- User
Metadata string - The metadata for metadata search, in JSON format.
- create_
time string - Timestamp when this RagFile 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
- The description of the RagFile.
- display_
name string - The display name of the RagFile, derived by the API from the source file.
- file_
statuses list(object) - State of the RagFile. Structure is documented below.
- gcs_
source object - The Cloud Storage location of the file to import. Structure is documented below.
- google_
drive_ objectsource - The Google Drive location of the file to import. Structure is documented below.
- max_
embedding_ numberrequests_ per_ min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- name string
- The generated ID of the RagFile.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag_
corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - rag_
file_ objectparsing_ config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag_
file_ objecttransformation_ config - The transformation config used when importing the file. Structure is documented below.
- region string
- The region of the RagCorpus. eg europe-west4
- update_
time string - Timestamp when this RagFile was last updated.
- user_
metadata string - The metadata for metadata search, in JSON format.
- create
Time String - Timestamp when this RagFile 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
- The description of the RagFile.
- display
Name String - The display name of the RagFile, derived by the API from the source file.
- file
Statuses List<AiRag File File Status> - State of the RagFile. Structure is documented below.
- gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding IntegerRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- name String
- The generated ID of the RagFile.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
Corpus String - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- region String
- The region of the RagCorpus. eg europe-west4
- update
Time String - Timestamp when this RagFile was last updated.
- user
Metadata String - The metadata for metadata search, in JSON format.
- create
Time string - Timestamp when this RagFile 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
- The description of the RagFile.
- display
Name string - The display name of the RagFile, derived by the API from the source file.
- file
Statuses AiRag File File Status[] - State of the RagFile. Structure is documented below.
- gcs
Source AiRag File Gcs Source - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive AiSource Rag File Google Drive Source - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding numberRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- name string
- The generated ID of the RagFile.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
Corpus string - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - rag
File AiParsing Config Rag File Rag File Parsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File AiTransformation Config Rag File Rag File Transformation Config - The transformation config used when importing the file. Structure is documented below.
- region string
- The region of the RagCorpus. eg europe-west4
- update
Time string - Timestamp when this RagFile was last updated.
- user
Metadata string - The metadata for metadata search, in JSON format.
- create_
time str - Timestamp when this RagFile 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
- The description of the RagFile.
- display_
name str - The display name of the RagFile, derived by the API from the source file.
- file_
statuses Sequence[AiRag File File Status Args] - State of the RagFile. Structure is documented below.
- gcs_
source AiRag File Gcs Source Args - The Cloud Storage location of the file to import. Structure is documented below.
- google_
drive_ Aisource Rag File Google Drive Source Args - The Google Drive location of the file to import. Structure is documented below.
- max_
embedding_ intrequests_ per_ min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- name str
- The generated ID of the RagFile.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag_
corpus str - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - rag_
file_ Aiparsing_ config Rag File Rag File Parsing Config Args - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag_
file_ Aitransformation_ config Rag File Rag File Transformation Config Args - The transformation config used when importing the file. Structure is documented below.
- region str
- The region of the RagCorpus. eg europe-west4
- update_
time str - Timestamp when this RagFile was last updated.
- user_
metadata str - The metadata for metadata search, in JSON format.
- create
Time String - Timestamp when this RagFile 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
- The description of the RagFile.
- display
Name String - The display name of the RagFile, derived by the API from the source file.
- file
Statuses List<Property Map> - State of the RagFile. Structure is documented below.
- gcs
Source Property Map - The Cloud Storage location of the file to import. Structure is documented below.
- google
Drive Property MapSource - The Google Drive location of the file to import. Structure is documented below.
- max
Embedding NumberRequests Per Min - The maximum number of queries per minute that the import is allowed to make to the embedding model specified on the RagCorpus.
- name String
- The generated ID of the RagFile.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rag
Corpus String - The ID of the RagCorpus to import the file into, for example the
nameattribute of agcp.vertex.AiRagCorpusresource. - rag
File Property MapParsing Config - The parsing config used when importing the file. The default parser is used if this field is not set. Structure is documented below.
- rag
File Property MapTransformation Config - The transformation config used when importing the file. Structure is documented below.
- region String
- The region of the RagCorpus. eg europe-west4
- update
Time String - Timestamp when this RagFile was last updated.
- user
Metadata String - The metadata for metadata search, in JSON format.
Supporting Types
AiRagFileFileStatus, AiRagFileFileStatusArgs
- Error
Status string - (Output) Only populated when the state is ERROR.
- State string
- (Output) RagFile state.
- Error
Status string - (Output) Only populated when the state is ERROR.
- State string
- (Output) RagFile state.
- error_
status string - (Output) Only populated when the state is ERROR.
- state string
- (Output) RagFile state.
- error
Status String - (Output) Only populated when the state is ERROR.
- state String
- (Output) RagFile state.
- error
Status string - (Output) Only populated when the state is ERROR.
- state string
- (Output) RagFile state.
- error_
status str - (Output) Only populated when the state is ERROR.
- state str
- (Output) RagFile state.
- error
Status String - (Output) Only populated when the state is ERROR.
- state String
- (Output) RagFile state.
AiRagFileGcsSource, AiRagFileGcsSourceArgs
- Uris string
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- Uris string
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- uris string
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- uris String
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- uris string
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- uris str
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
- uris String
- The Cloud Storage URI of the file to import, for example
gs://my-bucket/my-file.pdf. Must reference a single file; directories and wildcards are not supported because each resource manages one RagFile.
AiRagFileGoogleDriveSource, AiRagFileGoogleDriveSourceArgs
- Resource
Ids AiRag File Google Drive Source Resource Ids - The Google Drive file to import. Structure is documented below.
- Resource
Ids AiRag File Google Drive Source Resource Ids - The Google Drive file to import. Structure is documented below.
- resource_
ids object - The Google Drive file to import. Structure is documented below.
- resource
Ids AiRag File Google Drive Source Resource Ids - The Google Drive file to import. Structure is documented below.
- resource
Ids AiRag File Google Drive Source Resource Ids - The Google Drive file to import. Structure is documented below.
- resource_
ids AiRag File Google Drive Source Resource Ids - The Google Drive file to import. Structure is documented below.
- resource
Ids Property Map - The Google Drive file to import. Structure is documented below.
AiRagFileGoogleDriveSourceResourceIds, AiRagFileGoogleDriveSourceResourceIdsArgs
- Resource
Id string - The ID of the Google Drive file.
- Resource
Type string - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- Resource
Id string - The ID of the Google Drive file.
- Resource
Type string - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- resource_
id string - The ID of the Google Drive file.
- resource_
type string - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- resource
Id String - The ID of the Google Drive file.
- resource
Type String - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- resource
Id string - The ID of the Google Drive file.
- resource
Type string - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- resource_
id str - The ID of the Google Drive file.
- resource_
type str - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
- resource
Id String - The ID of the Google Drive file.
- resource
Type String - The type of the Google Drive resource. Only individual files are
supported because each resource manages one RagFile.
Default value is
RESOURCE_TYPE_FILE. Possible values are:RESOURCE_TYPE_FILE.
AiRagFileRagFileParsingConfig, AiRagFileRagFileParsingConfigArgs
- Layout
Parser AiRag File Rag File Parsing Config Layout Parser - The Document AI Layout Parser to use for the file. Structure is documented below.
- Llm
Parser AiRag File Rag File Parsing Config Llm Parser - The LLM parser to use for the file. Structure is documented below.
- Layout
Parser AiRag File Rag File Parsing Config Layout Parser - The Document AI Layout Parser to use for the file. Structure is documented below.
- Llm
Parser AiRag File Rag File Parsing Config Llm Parser - The LLM parser to use for the file. Structure is documented below.
- layout_
parser object - The Document AI Layout Parser to use for the file. Structure is documented below.
- llm_
parser object - The LLM parser to use for the file. Structure is documented below.
- layout
Parser AiRag File Rag File Parsing Config Layout Parser - The Document AI Layout Parser to use for the file. Structure is documented below.
- llm
Parser AiRag File Rag File Parsing Config Llm Parser - The LLM parser to use for the file. Structure is documented below.
- layout
Parser AiRag File Rag File Parsing Config Layout Parser - The Document AI Layout Parser to use for the file. Structure is documented below.
- llm
Parser AiRag File Rag File Parsing Config Llm Parser - The LLM parser to use for the file. Structure is documented below.
- layout_
parser AiRag File Rag File Parsing Config Layout Parser - The Document AI Layout Parser to use for the file. Structure is documented below.
- llm_
parser AiRag File Rag File Parsing Config Llm Parser - The LLM parser to use for the file. Structure is documented below.
- layout
Parser Property Map - The Document AI Layout Parser to use for the file. Structure is documented below.
- llm
Parser Property Map - The LLM parser to use for the file. Structure is documented below.
AiRagFileRagFileParsingConfigLayoutParser, AiRagFileRagFileParsingConfigLayoutParserArgs
- Max
Parsing intRequests Per Min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- Processor
Name string - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- Max
Parsing intRequests Per Min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- Processor
Name string - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- max_
parsing_ numberrequests_ per_ min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- processor_
name string - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- max
Parsing IntegerRequests Per Min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- processor
Name String - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- max
Parsing numberRequests Per Min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- processor
Name string - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- max_
parsing_ intrequests_ per_ min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- processor_
name str - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
- max
Parsing NumberRequests Per Min - The maximum number of requests the job is allowed to make to the Document AI processor per minute.
- processor
Name String - The full resource name of a Document AI processor or processor version
of type
LAYOUT_PARSER_PROCESSOR. Format:projects/{project_id}/locations/{location}/processors/{processor_id}orprojects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}.
AiRagFileRagFileParsingConfigLlmParser, AiRagFileRagFileParsingConfigLlmParserArgs
- Custom
Parsing stringPrompt - The prompt to use for parsing. If not specified, a default prompt is used.
- Max
Parsing intRequests Per Min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- Model
Name string - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- Custom
Parsing stringPrompt - The prompt to use for parsing. If not specified, a default prompt is used.
- Max
Parsing intRequests Per Min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- Model
Name string - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- custom_
parsing_ stringprompt - The prompt to use for parsing. If not specified, a default prompt is used.
- max_
parsing_ numberrequests_ per_ min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- model_
name string - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- custom
Parsing StringPrompt - The prompt to use for parsing. If not specified, a default prompt is used.
- max
Parsing IntegerRequests Per Min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- model
Name String - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- custom
Parsing stringPrompt - The prompt to use for parsing. If not specified, a default prompt is used.
- max
Parsing numberRequests Per Min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- model
Name string - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- custom_
parsing_ strprompt - The prompt to use for parsing. If not specified, a default prompt is used.
- max_
parsing_ intrequests_ per_ min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- model_
name str - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
- custom
Parsing StringPrompt - The prompt to use for parsing. If not specified, a default prompt is used.
- max
Parsing NumberRequests Per Min - The maximum number of requests the job is allowed to make to the LLM model per minute.
- model
Name String - The name of a LLM model used for parsing. Format:
projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}.
AiRagFileRagFileTransformationConfig, AiRagFileRagFileTransformationConfigArgs
- Rag
File AiChunking Config Rag File Rag File Transformation Config Rag File Chunking Config - The chunking config for the file. Structure is documented below.
- Rag
File AiChunking Config Rag File Rag File Transformation Config Rag File Chunking Config - The chunking config for the file. Structure is documented below.
- rag_
file_ objectchunking_ config - The chunking config for the file. Structure is documented below.
- rag
File AiChunking Config Rag File Rag File Transformation Config Rag File Chunking Config - The chunking config for the file. Structure is documented below.
- rag
File AiChunking Config Rag File Rag File Transformation Config Rag File Chunking Config - The chunking config for the file. Structure is documented below.
- rag_
file_ Aichunking_ config Rag File Rag File Transformation Config Rag File Chunking Config - The chunking config for the file. Structure is documented below.
- rag
File Property MapChunking Config - The chunking config for the file. Structure is documented below.
AiRagFileRagFileTransformationConfigRagFileChunkingConfig, AiRagFileRagFileTransformationConfigRagFileChunkingConfigArgs
- Fixed
Length AiChunking Rag File Rag File Transformation Config Rag File Chunking Config Fixed Length Chunking - The fixed length chunking config. Structure is documented below.
- Fixed
Length AiChunking Rag File Rag File Transformation Config Rag File Chunking Config Fixed Length Chunking - The fixed length chunking config. Structure is documented below.
- fixed_
length_ objectchunking - The fixed length chunking config. Structure is documented below.
- fixed
Length AiChunking Rag File Rag File Transformation Config Rag File Chunking Config Fixed Length Chunking - The fixed length chunking config. Structure is documented below.
- fixed
Length AiChunking Rag File Rag File Transformation Config Rag File Chunking Config Fixed Length Chunking - The fixed length chunking config. Structure is documented below.
- fixed_
length_ Aichunking Rag File Rag File Transformation Config Rag File Chunking Config Fixed Length Chunking - The fixed length chunking config. Structure is documented below.
- fixed
Length Property MapChunking - The fixed length chunking config. Structure is documented below.
AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunking, AiRagFileRagFileTransformationConfigRagFileChunkingConfigFixedLengthChunkingArgs
- Chunk
Overlap int - The overlap between chunks.
- Chunk
Size int - The size of the chunks.
- Chunk
Overlap int - The overlap between chunks.
- Chunk
Size int - The size of the chunks.
- chunk_
overlap number - The overlap between chunks.
- chunk_
size number - The size of the chunks.
- chunk
Overlap Integer - The overlap between chunks.
- chunk
Size Integer - The size of the chunks.
- chunk
Overlap number - The overlap between chunks.
- chunk
Size number - The size of the chunks.
- chunk_
overlap int - The overlap between chunks.
- chunk_
size int - The size of the chunks.
- chunk
Overlap Number - The overlap between chunks.
- chunk
Size Number - The size of the chunks.
Import
RagFile can be imported using any of these accepted formats:
projects/{{project}}/locations/{{region}}/ragCorpora/{{rag_corpus}}/ragFiles/{{name}}{{project}}/{{region}}/{{rag_corpus}}/{{name}}{{region}}/{{rag_corpus}}/{{name}}{{rag_corpus}}/{{name}}
When using the pulumi import command, RagFile can be imported using one of the formats above. For example:
$ pulumi import gcp:vertex/aiRagFile:AiRagFile default projects/{{project}}/locations/{{region}}/ragCorpora/{{rag_corpus}}/ragFiles/{{name}}
$ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{project}}/{{region}}/{{rag_corpus}}/{{name}}
$ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{region}}/{{rag_corpus}}/{{name}}
$ pulumi import gcp:vertex/aiRagFile:AiRagFile default {{rag_corpus}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Wednesday, Nov 18, 2026 by Pulumi