published on Wednesday, Jul 29, 2026 by Pulumi
published on Wednesday, Jul 29, 2026 by Pulumi
An Index defines an approximate nearest-neighbor search structure over a field of a Vector Search Collection.
Example Usage
Vectorsearch Index Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
const parent = new gcp.vectorsearch.Collection("parent", {
location: "us-central1",
collectionId: "example-collection",
displayName: "My Awesome Collection",
description: "This collection stores important data.",
dataSchema: `{
\\"type\\": \\"object\\",
\\"properties\\": {
\\"title\\": {
\\"type\\": \\"string\\"
},
\\"plot\\": {
\\"type\\": \\"string\\"
}
}
}
`,
vectorSchemas: [{
fieldName: "text_embedding",
denseVector: {
dimensions: 768,
vertexEmbeddingConfig: {
modelId: "textembedding-gecko@003",
taskType: "RETRIEVAL_DOCUMENT",
textTemplate: "Title: {title} ---- Plot: {plot}",
},
},
}],
});
const example_index = new gcp.vectorsearch.Index("example-index", {
location: "us-central1",
collectionId: parent.collectionId,
indexId: "example-index",
displayName: "My Awesome Index",
description: "ScaNN index over text_embedding.",
indexField: "text_embedding",
distanceMetric: "DOT_PRODUCT",
denseScann: {
featureNormType: "UNIT_L2_NORM",
},
});
import pulumi
import pulumi_gcp as gcp
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
parent = gcp.vectorsearch.Collection("parent",
location="us-central1",
collection_id="example-collection",
display_name="My Awesome Collection",
description="This collection stores important data.",
data_schema="""{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
""",
vector_schemas=[{
"field_name": "text_embedding",
"dense_vector": {
"dimensions": 768,
"vertex_embedding_config": {
"model_id": "textembedding-gecko@003",
"task_type": "RETRIEVAL_DOCUMENT",
"text_template": "Title: {title} ---- Plot: {plot}",
},
},
}])
example_index = gcp.vectorsearch.Index("example-index",
location="us-central1",
collection_id=parent.collection_id,
index_id="example-index",
display_name="My Awesome Index",
description="ScaNN index over text_embedding.",
index_field="text_embedding",
distance_metric="DOT_PRODUCT",
dense_scann={
"feature_norm_type": "UNIT_L2_NORM",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vectorsearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
parent, err := vectorsearch.NewCollection(ctx, "parent", &vectorsearch.CollectionArgs{
Location: pulumi.String("us-central1"),
CollectionId: pulumi.String("example-collection"),
DisplayName: pulumi.String("My Awesome Collection"),
Description: pulumi.String("This collection stores important data."),
DataSchema: pulumi.String(`{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
`),
VectorSchemas: vectorsearch.CollectionVectorSchemaArray{
&vectorsearch.CollectionVectorSchemaArgs{
FieldName: pulumi.String("text_embedding"),
DenseVector: &vectorsearch.CollectionVectorSchemaDenseVectorArgs{
Dimensions: pulumi.Int(768),
VertexEmbeddingConfig: &vectorsearch.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs{
ModelId: pulumi.String("textembedding-gecko@003"),
TaskType: pulumi.String("RETRIEVAL_DOCUMENT"),
TextTemplate: pulumi.String("Title: {title} ---- Plot: {plot}"),
},
},
},
},
})
if err != nil {
return err
}
_, err = vectorsearch.NewIndex(ctx, "example-index", &vectorsearch.IndexArgs{
Location: pulumi.String("us-central1"),
CollectionId: parent.CollectionId,
IndexId: pulumi.String("example-index"),
DisplayName: pulumi.String("My Awesome Index"),
Description: pulumi.String("ScaNN index over text_embedding."),
IndexField: pulumi.String("text_embedding"),
DistanceMetric: pulumi.String("DOT_PRODUCT"),
DenseScann: &vectorsearch.IndexDenseScannArgs{
FeatureNormType: pulumi.String("UNIT_L2_NORM"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
var parent = new Gcp.VectorSearch.Collection("parent", new()
{
Location = "us-central1",
CollectionId = "example-collection",
DisplayName = "My Awesome Collection",
Description = "This collection stores important data.",
DataSchema = @"{
\""type\"": \""object\"",
\""properties\"": {
\""title\"": {
\""type\"": \""string\""
},
\""plot\"": {
\""type\"": \""string\""
}
}
}
",
VectorSchemas = new[]
{
new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
{
FieldName = "text_embedding",
DenseVector = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorArgs
{
Dimensions = 768,
VertexEmbeddingConfig = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs
{
ModelId = "textembedding-gecko@003",
TaskType = "RETRIEVAL_DOCUMENT",
TextTemplate = "Title: {title} ---- Plot: {plot}",
},
},
},
},
});
var example_index = new Gcp.VectorSearch.Index("example-index", new()
{
Location = "us-central1",
CollectionId = parent.CollectionId,
IndexId = "example-index",
DisplayName = "My Awesome Index",
Description = "ScaNN index over text_embedding.",
IndexField = "text_embedding",
DistanceMetric = "DOT_PRODUCT",
DenseScann = new Gcp.VectorSearch.Inputs.IndexDenseScannArgs
{
FeatureNormType = "UNIT_L2_NORM",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vectorsearch.Collection;
import com.pulumi.gcp.vectorsearch.CollectionArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs;
import com.pulumi.gcp.vectorsearch.Index;
import com.pulumi.gcp.vectorsearch.IndexArgs;
import com.pulumi.gcp.vectorsearch.inputs.IndexDenseScannArgs;
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) {
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
var parent = new Collection("parent", CollectionArgs.builder()
.location("us-central1")
.collectionId("example-collection")
.displayName("My Awesome Collection")
.description("This collection stores important data.")
.dataSchema("""
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
""")
.vectorSchemas(CollectionVectorSchemaArgs.builder()
.fieldName("text_embedding")
.denseVector(CollectionVectorSchemaDenseVectorArgs.builder()
.dimensions(768)
.vertexEmbeddingConfig(CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs.builder()
.modelId("textembedding-gecko@003")
.taskType("RETRIEVAL_DOCUMENT")
.textTemplate("Title: {title} ---- Plot: {plot}")
.build())
.build())
.build())
.build());
var example_index = new Index("example-index", IndexArgs.builder()
.location("us-central1")
.collectionId(parent.collectionId())
.indexId("example-index")
.displayName("My Awesome Index")
.description("ScaNN index over text_embedding.")
.indexField("text_embedding")
.distanceMetric("DOT_PRODUCT")
.denseScann(IndexDenseScannArgs.builder()
.featureNormType("UNIT_L2_NORM")
.build())
.build());
}
}
resources:
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
parent:
type: gcp:vectorsearch:Collection
properties:
location: us-central1
collectionId: example-collection
displayName: My Awesome Collection
description: This collection stores important data.
dataSchema: |
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"plot\": {
\"type\": \"string\"
}
}
}
vectorSchemas:
- fieldName: text_embedding
denseVector:
dimensions: 768
vertexEmbeddingConfig:
modelId: textembedding-gecko@003
taskType: RETRIEVAL_DOCUMENT
textTemplate: 'Title: {title} ---- Plot: {plot}'
example-index:
type: gcp:vectorsearch:Index
properties:
location: us-central1
collectionId: ${parent.collectionId}
indexId: example-index
displayName: My Awesome Index
description: ScaNN index over text_embedding.
indexField: text_embedding
distanceMetric: DOT_PRODUCT
denseScann:
featureNormType: UNIT_L2_NORM
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
resource "gcp_vectorsearch_collection" "parent" {
location = "us-central1"
collection_id = "example-collection"
display_name = "My Awesome Collection"
description = "This collection stores important data."
data_schema = "{\n \\\"type\\\": \\\"object\\\",\n \\\"properties\\\": {\n \\\"title\\\": {\n \\\"type\\\": \\\"string\\\"\n },\n \\\"plot\\\": {\n \\\"type\\\": \\\"string\\\"\n }\n }\n}\n"
vector_schemas {
field_name = "text_embedding"
dense_vector = {
dimensions = 768
vertex_embedding_config = {
model_id = "textembedding-gecko@003"
task_type = "RETRIEVAL_DOCUMENT"
text_template = "Title: {title} ---- Plot: {plot}"
}
}
}
}
resource "gcp_vectorsearch_index" "example-index" {
location = "us-central1"
collection_id = gcp_vectorsearch_collection.parent.collection_id
index_id = "example-index"
display_name = "My Awesome Index"
description = "ScaNN index over text_embedding."
index_field = "text_embedding"
distance_metric = "DOT_PRODUCT"
dense_scann = {
feature_norm_type = "UNIT_L2_NORM"
}
}
Vectorsearch Index Dedicated
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
const parent = new gcp.vectorsearch.Collection("parent", {
location: "us-central1",
collectionId: "example-dedicated-collection",
displayName: "My Awesome Collection",
description: "Parent collection for a dedicated-infrastructure index.",
dataSchema: `{
\\"type\\": \\"object\\",
\\"properties\\": {
\\"title\\": {
\\"type\\": \\"string\\"
},
\\"category\\": {
\\"type\\": \\"string\\"
}
}
}
`,
vectorSchemas: [{
fieldName: "text_embedding",
denseVector: {
dimensions: 768,
vertexEmbeddingConfig: {
modelId: "textembedding-gecko@003",
taskType: "RETRIEVAL_DOCUMENT",
textTemplate: "Title: {title}",
},
},
}],
});
const example_dedicated_index = new gcp.vectorsearch.Index("example-dedicated-index", {
location: "us-central1",
collectionId: parent.collectionId,
indexId: "example-dedicated-index",
displayName: "My Dedicated Index",
description: "Index served on dedicated infrastructure with autoscaling.",
indexField: "text_embedding",
distanceMetric: "COSINE_DISTANCE",
filterFields: ["category"],
storeFields: ["title"],
denseScann: {
featureNormType: "UNIT_L2_NORM",
},
dedicatedInfrastructure: {
mode: "PERFORMANCE_OPTIMIZED",
autoscalingSpec: {
minReplicaCount: 2,
maxReplicaCount: 5,
},
},
});
import pulumi
import pulumi_gcp as gcp
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
parent = gcp.vectorsearch.Collection("parent",
location="us-central1",
collection_id="example-dedicated-collection",
display_name="My Awesome Collection",
description="Parent collection for a dedicated-infrastructure index.",
data_schema="""{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"category\": {
\"type\": \"string\"
}
}
}
""",
vector_schemas=[{
"field_name": "text_embedding",
"dense_vector": {
"dimensions": 768,
"vertex_embedding_config": {
"model_id": "textembedding-gecko@003",
"task_type": "RETRIEVAL_DOCUMENT",
"text_template": "Title: {title}",
},
},
}])
example_dedicated_index = gcp.vectorsearch.Index("example-dedicated-index",
location="us-central1",
collection_id=parent.collection_id,
index_id="example-dedicated-index",
display_name="My Dedicated Index",
description="Index served on dedicated infrastructure with autoscaling.",
index_field="text_embedding",
distance_metric="COSINE_DISTANCE",
filter_fields=["category"],
store_fields=["title"],
dense_scann={
"feature_norm_type": "UNIT_L2_NORM",
},
dedicated_infrastructure={
"mode": "PERFORMANCE_OPTIMIZED",
"autoscaling_spec": {
"min_replica_count": 2,
"max_replica_count": 5,
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vectorsearch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
parent, err := vectorsearch.NewCollection(ctx, "parent", &vectorsearch.CollectionArgs{
Location: pulumi.String("us-central1"),
CollectionId: pulumi.String("example-dedicated-collection"),
DisplayName: pulumi.String("My Awesome Collection"),
Description: pulumi.String("Parent collection for a dedicated-infrastructure index."),
DataSchema: pulumi.String(`{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"category\": {
\"type\": \"string\"
}
}
}
`),
VectorSchemas: vectorsearch.CollectionVectorSchemaArray{
&vectorsearch.CollectionVectorSchemaArgs{
FieldName: pulumi.String("text_embedding"),
DenseVector: &vectorsearch.CollectionVectorSchemaDenseVectorArgs{
Dimensions: pulumi.Int(768),
VertexEmbeddingConfig: &vectorsearch.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs{
ModelId: pulumi.String("textembedding-gecko@003"),
TaskType: pulumi.String("RETRIEVAL_DOCUMENT"),
TextTemplate: pulumi.String("Title: {title}"),
},
},
},
},
})
if err != nil {
return err
}
_, err = vectorsearch.NewIndex(ctx, "example-dedicated-index", &vectorsearch.IndexArgs{
Location: pulumi.String("us-central1"),
CollectionId: parent.CollectionId,
IndexId: pulumi.String("example-dedicated-index"),
DisplayName: pulumi.String("My Dedicated Index"),
Description: pulumi.String("Index served on dedicated infrastructure with autoscaling."),
IndexField: pulumi.String("text_embedding"),
DistanceMetric: pulumi.String("COSINE_DISTANCE"),
FilterFields: pulumi.StringArray{
pulumi.String("category"),
},
StoreFields: pulumi.StringArray{
pulumi.String("title"),
},
DenseScann: &vectorsearch.IndexDenseScannArgs{
FeatureNormType: pulumi.String("UNIT_L2_NORM"),
},
DedicatedInfrastructure: &vectorsearch.IndexDedicatedInfrastructureArgs{
Mode: pulumi.String("PERFORMANCE_OPTIMIZED"),
AutoscalingSpec: &vectorsearch.IndexDedicatedInfrastructureAutoscalingSpecArgs{
MinReplicaCount: pulumi.Int(2),
MaxReplicaCount: pulumi.Int(5),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
var parent = new Gcp.VectorSearch.Collection("parent", new()
{
Location = "us-central1",
CollectionId = "example-dedicated-collection",
DisplayName = "My Awesome Collection",
Description = "Parent collection for a dedicated-infrastructure index.",
DataSchema = @"{
\""type\"": \""object\"",
\""properties\"": {
\""title\"": {
\""type\"": \""string\""
},
\""category\"": {
\""type\"": \""string\""
}
}
}
",
VectorSchemas = new[]
{
new Gcp.VectorSearch.Inputs.CollectionVectorSchemaArgs
{
FieldName = "text_embedding",
DenseVector = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorArgs
{
Dimensions = 768,
VertexEmbeddingConfig = new Gcp.VectorSearch.Inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs
{
ModelId = "textembedding-gecko@003",
TaskType = "RETRIEVAL_DOCUMENT",
TextTemplate = "Title: {title}",
},
},
},
},
});
var example_dedicated_index = new Gcp.VectorSearch.Index("example-dedicated-index", new()
{
Location = "us-central1",
CollectionId = parent.CollectionId,
IndexId = "example-dedicated-index",
DisplayName = "My Dedicated Index",
Description = "Index served on dedicated infrastructure with autoscaling.",
IndexField = "text_embedding",
DistanceMetric = "COSINE_DISTANCE",
FilterFields = new[]
{
"category",
},
StoreFields = new[]
{
"title",
},
DenseScann = new Gcp.VectorSearch.Inputs.IndexDenseScannArgs
{
FeatureNormType = "UNIT_L2_NORM",
},
DedicatedInfrastructure = new Gcp.VectorSearch.Inputs.IndexDedicatedInfrastructureArgs
{
Mode = "PERFORMANCE_OPTIMIZED",
AutoscalingSpec = new Gcp.VectorSearch.Inputs.IndexDedicatedInfrastructureAutoscalingSpecArgs
{
MinReplicaCount = 2,
MaxReplicaCount = 5,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vectorsearch.Collection;
import com.pulumi.gcp.vectorsearch.CollectionArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorArgs;
import com.pulumi.gcp.vectorsearch.inputs.CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs;
import com.pulumi.gcp.vectorsearch.Index;
import com.pulumi.gcp.vectorsearch.IndexArgs;
import com.pulumi.gcp.vectorsearch.inputs.IndexDenseScannArgs;
import com.pulumi.gcp.vectorsearch.inputs.IndexDedicatedInfrastructureArgs;
import com.pulumi.gcp.vectorsearch.inputs.IndexDedicatedInfrastructureAutoscalingSpecArgs;
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) {
// NOTE: For most workloads we recommend creating the Collection and the Index
// in *separate* Terraform configurations (i.e. create and apply the Collection
// first, ingest data via importDataObjects, and only then create the Index in a
// second configuration). Once an Index exists on a Collection you can no longer
// run importDataObjects for bulk ingestion of data objects on that Collection --
// you are limited to creating data objects one at a time or in small online
// batches. Defining both resources in the same Terraform file (as shown below)
// is convenient for a quick start, but locks you into the online / batched
// create path for any subsequent data ingestion.
var parent = new Collection("parent", CollectionArgs.builder()
.location("us-central1")
.collectionId("example-dedicated-collection")
.displayName("My Awesome Collection")
.description("Parent collection for a dedicated-infrastructure index.")
.dataSchema("""
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"category\": {
\"type\": \"string\"
}
}
}
""")
.vectorSchemas(CollectionVectorSchemaArgs.builder()
.fieldName("text_embedding")
.denseVector(CollectionVectorSchemaDenseVectorArgs.builder()
.dimensions(768)
.vertexEmbeddingConfig(CollectionVectorSchemaDenseVectorVertexEmbeddingConfigArgs.builder()
.modelId("textembedding-gecko@003")
.taskType("RETRIEVAL_DOCUMENT")
.textTemplate("Title: {title}")
.build())
.build())
.build())
.build());
var example_dedicated_index = new Index("example-dedicated-index", IndexArgs.builder()
.location("us-central1")
.collectionId(parent.collectionId())
.indexId("example-dedicated-index")
.displayName("My Dedicated Index")
.description("Index served on dedicated infrastructure with autoscaling.")
.indexField("text_embedding")
.distanceMetric("COSINE_DISTANCE")
.filterFields("category")
.storeFields("title")
.denseScann(IndexDenseScannArgs.builder()
.featureNormType("UNIT_L2_NORM")
.build())
.dedicatedInfrastructure(IndexDedicatedInfrastructureArgs.builder()
.mode("PERFORMANCE_OPTIMIZED")
.autoscalingSpec(IndexDedicatedInfrastructureAutoscalingSpecArgs.builder()
.minReplicaCount(2)
.maxReplicaCount(5)
.build())
.build())
.build());
}
}
resources:
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
parent:
type: gcp:vectorsearch:Collection
properties:
location: us-central1
collectionId: example-dedicated-collection
displayName: My Awesome Collection
description: Parent collection for a dedicated-infrastructure index.
dataSchema: |
{
\"type\": \"object\",
\"properties\": {
\"title\": {
\"type\": \"string\"
},
\"category\": {
\"type\": \"string\"
}
}
}
vectorSchemas:
- fieldName: text_embedding
denseVector:
dimensions: 768
vertexEmbeddingConfig:
modelId: textembedding-gecko@003
taskType: RETRIEVAL_DOCUMENT
textTemplate: 'Title: {title}'
example-dedicated-index:
type: gcp:vectorsearch:Index
properties:
location: us-central1
collectionId: ${parent.collectionId}
indexId: example-dedicated-index
displayName: My Dedicated Index
description: Index served on dedicated infrastructure with autoscaling.
indexField: text_embedding
distanceMetric: COSINE_DISTANCE
filterFields:
- category
storeFields:
- title
denseScann:
featureNormType: UNIT_L2_NORM
dedicatedInfrastructure:
mode: PERFORMANCE_OPTIMIZED
autoscalingSpec:
minReplicaCount: 2
maxReplicaCount: 5
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
# NOTE: For most workloads we recommend creating the Collection and the Index
# in *separate* Terraform configurations (i.e. create and apply the Collection
# first, ingest data via importDataObjects, and only then create the Index in a
# second configuration). Once an Index exists on a Collection you can no longer
# run importDataObjects for bulk ingestion of data objects on that Collection --
# you are limited to creating data objects one at a time or in small online
# batches. Defining both resources in the same Terraform file (as shown below)
# is convenient for a quick start, but locks you into the online / batched
# create path for any subsequent data ingestion.
resource "gcp_vectorsearch_collection" "parent" {
location = "us-central1"
collection_id = "example-dedicated-collection"
display_name = "My Awesome Collection"
description = "Parent collection for a dedicated-infrastructure index."
data_schema = "{\n \\\"type\\\": \\\"object\\\",\n \\\"properties\\\": {\n \\\"title\\\": {\n \\\"type\\\": \\\"string\\\"\n },\n \\\"category\\\": {\n \\\"type\\\": \\\"string\\\"\n }\n }\n}\n"
vector_schemas {
field_name = "text_embedding"
dense_vector = {
dimensions = 768
vertex_embedding_config = {
model_id = "textembedding-gecko@003"
task_type = "RETRIEVAL_DOCUMENT"
text_template = "Title: {title}"
}
}
}
}
resource "gcp_vectorsearch_index" "example-dedicated-index" {
location = "us-central1"
collection_id = gcp_vectorsearch_collection.parent.collection_id
index_id = "example-dedicated-index"
display_name = "My Dedicated Index"
description = "Index served on dedicated infrastructure with autoscaling."
index_field = "text_embedding"
distance_metric = "COSINE_DISTANCE"
filter_fields = ["category"]
store_fields = ["title"]
dense_scann = {
feature_norm_type = "UNIT_L2_NORM"
}
dedicated_infrastructure = {
mode = "PERFORMANCE_OPTIMIZED"
autoscaling_spec = {
min_replica_count = 2
max_replica_count = 5
}
}
}
Create Index Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Index(name: string, args: IndexArgs, opts?: CustomResourceOptions);@overload
def Index(resource_name: str,
args: IndexArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Index(resource_name: str,
opts: Optional[ResourceOptions] = None,
index_field: Optional[str] = None,
location: Optional[str] = None,
index_id: Optional[str] = None,
collection_id: Optional[str] = None,
dense_scann: Optional[IndexDenseScannArgs] = None,
display_name: Optional[str] = None,
distance_metric: Optional[str] = None,
filter_fields: Optional[Sequence[str]] = None,
description: Optional[str] = None,
deletion_policy: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
dedicated_infrastructure: Optional[IndexDedicatedInfrastructureArgs] = None,
project: Optional[str] = None,
store_fields: Optional[Sequence[str]] = None)func NewIndex(ctx *Context, name string, args IndexArgs, opts ...ResourceOption) (*Index, error)public Index(string name, IndexArgs args, CustomResourceOptions? opts = null)type: gcp:vectorsearch:Index
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_vectorsearch_index" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args IndexArgs
- 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 IndexArgs
- 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 IndexArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IndexArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IndexArgs
- 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 gcpIndexResource = new Gcp.VectorSearch.Index("gcpIndexResource", new()
{
IndexField = "string",
Location = "string",
IndexId = "string",
CollectionId = "string",
DenseScann = new Gcp.VectorSearch.Inputs.IndexDenseScannArgs
{
FeatureNormType = "string",
},
DisplayName = "string",
DistanceMetric = "string",
FilterFields = new[]
{
"string",
},
Description = "string",
DeletionPolicy = "string",
Labels =
{
{ "string", "string" },
},
DedicatedInfrastructure = new Gcp.VectorSearch.Inputs.IndexDedicatedInfrastructureArgs
{
AutoscalingSpec = new Gcp.VectorSearch.Inputs.IndexDedicatedInfrastructureAutoscalingSpecArgs
{
MaxReplicaCount = 0,
MinReplicaCount = 0,
},
Mode = "string",
},
Project = "string",
StoreFields = new[]
{
"string",
},
});
example, err := vectorsearch.NewIndex(ctx, "gcpIndexResource", &vectorsearch.IndexArgs{
IndexField: pulumi.String("string"),
Location: pulumi.String("string"),
IndexId: pulumi.String("string"),
CollectionId: pulumi.String("string"),
DenseScann: &vectorsearch.IndexDenseScannArgs{
FeatureNormType: pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
DistanceMetric: pulumi.String("string"),
FilterFields: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
DedicatedInfrastructure: &vectorsearch.IndexDedicatedInfrastructureArgs{
AutoscalingSpec: &vectorsearch.IndexDedicatedInfrastructureAutoscalingSpecArgs{
MaxReplicaCount: pulumi.Int(0),
MinReplicaCount: pulumi.Int(0),
},
Mode: pulumi.String("string"),
},
Project: pulumi.String("string"),
StoreFields: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "gcp_vectorsearch_index" "gcpIndexResource" {
lifecycle {
create_before_destroy = true
}
index_field = "string"
location = "string"
index_id = "string"
collection_id = "string"
dense_scann = {
feature_norm_type = "string"
}
display_name = "string"
distance_metric = "string"
filter_fields = ["string"]
description = "string"
deletion_policy = "string"
labels = {
"string" = "string"
}
dedicated_infrastructure = {
autoscaling_spec = {
max_replica_count = 0
min_replica_count = 0
}
mode = "string"
}
project = "string"
store_fields = ["string"]
}
var gcpIndexResource = new com.pulumi.gcp.vectorsearch.Index("gcpIndexResource", com.pulumi.gcp.vectorsearch.IndexArgs.builder()
.indexField("string")
.location("string")
.indexId("string")
.collectionId("string")
.denseScann(IndexDenseScannArgs.builder()
.featureNormType("string")
.build())
.displayName("string")
.distanceMetric("string")
.filterFields("string")
.description("string")
.deletionPolicy("string")
.labels(Map.of("string", "string"))
.dedicatedInfrastructure(IndexDedicatedInfrastructureArgs.builder()
.autoscalingSpec(IndexDedicatedInfrastructureAutoscalingSpecArgs.builder()
.maxReplicaCount(0)
.minReplicaCount(0)
.build())
.mode("string")
.build())
.project("string")
.storeFields("string")
.build());
gcp_index_resource = gcp.vectorsearch.Index("gcpIndexResource",
index_field="string",
location="string",
index_id="string",
collection_id="string",
dense_scann={
"feature_norm_type": "string",
},
display_name="string",
distance_metric="string",
filter_fields=["string"],
description="string",
deletion_policy="string",
labels={
"string": "string",
},
dedicated_infrastructure={
"autoscaling_spec": {
"max_replica_count": 0,
"min_replica_count": 0,
},
"mode": "string",
},
project="string",
store_fields=["string"])
const gcpIndexResource = new gcp.vectorsearch.Index("gcpIndexResource", {
indexField: "string",
location: "string",
indexId: "string",
collectionId: "string",
denseScann: {
featureNormType: "string",
},
displayName: "string",
distanceMetric: "string",
filterFields: ["string"],
description: "string",
deletionPolicy: "string",
labels: {
string: "string",
},
dedicatedInfrastructure: {
autoscalingSpec: {
maxReplicaCount: 0,
minReplicaCount: 0,
},
mode: "string",
},
project: "string",
storeFields: ["string"],
});
type: gcp:vectorsearch:Index
properties:
collectionId: string
dedicatedInfrastructure:
autoscalingSpec:
maxReplicaCount: 0
minReplicaCount: 0
mode: string
deletionPolicy: string
denseScann:
featureNormType: string
description: string
displayName: string
distanceMetric: string
filterFields:
- string
indexField: string
indexId: string
labels:
string: string
location: string
project: string
storeFields:
- string
Index 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 Index resource accepts the following input properties:
- Collection
Id string - The ID of the parent Collection.
- Index
Field string - The collection schema field to index.
- Index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- Dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - Description string
- User-specified description of the index
- Display
Name string - User-specified display name of the index
- Distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - Filter
Fields List<string> - The fields to push into the index to enable fast ANN inline filtering.
- Labels Dictionary<string, string>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Store
Fields List<string> - The fields to push into the index to enable inline data retrieval.
- Collection
Id string - The ID of the parent Collection.
- Index
Field string - The collection schema field to index.
- Index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Dedicated
Infrastructure IndexDedicated Infrastructure Args - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- Dense
Scann IndexDense Scann Args - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - Description string
- User-specified description of the index
- Display
Name string - User-specified display name of the index
- Distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - Filter
Fields []string - The fields to push into the index to enable fast ANN inline filtering.
- Labels map[string]string
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Store
Fields []string - The fields to push into the index to enable inline data retrieval.
- collection_
id string - The ID of the parent Collection.
- index_
field string - The collection schema field to index.
- index_
id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - dedicated_
infrastructure object - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense_
scann object - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description string
- User-specified description of the index
- display_
name string - User-specified display name of the index
- distance_
metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - filter_
fields list(string) - The fields to push into the index to enable fast ANN inline filtering.
- labels map(string)
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- store_
fields list(string) - The fields to push into the index to enable inline data retrieval.
- collection
Id String - The ID of the parent Collection.
- index
Field String - The collection schema field to index.
- index
Id String - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description String
- User-specified description of the index
- display
Name String - User-specified display name of the index
- distance
Metric String - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - filter
Fields List<String> - The fields to push into the index to enable fast ANN inline filtering.
- labels Map<String,String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- store
Fields List<String> - The fields to push into the index to enable inline data retrieval.
- collection
Id string - The ID of the parent Collection.
- index
Field string - The collection schema field to index.
- index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description string
- User-specified description of the index
- display
Name string - User-specified display name of the index
- distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - filter
Fields string[] - The fields to push into the index to enable fast ANN inline filtering.
- labels {[key: string]: string}
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- store
Fields string[] - The fields to push into the index to enable inline data retrieval.
- collection_
id str - The ID of the parent Collection.
- index_
field str - The collection schema field to index.
- index_
id str - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - dedicated_
infrastructure IndexDedicated Infrastructure Args - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense_
scann IndexDense Scann Args - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description str
- User-specified description of the index
- display_
name str - User-specified display name of the index
- distance_
metric str - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - filter_
fields Sequence[str] - The fields to push into the index to enable fast ANN inline filtering.
- labels Mapping[str, str]
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- store_
fields Sequence[str] - The fields to push into the index to enable inline data retrieval.
- collection
Id String - The ID of the parent Collection.
- index
Field String - The collection schema field to index.
- index
Id String - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - dedicated
Infrastructure Property Map - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann Property Map - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description String
- User-specified description of the index
- display
Name String - User-specified display name of the index
- distance
Metric String - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - filter
Fields List<String> - The fields to push into the index to enable fast ANN inline filtering.
- labels Map<String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- store
Fields List<String> - The fields to push into the index to enable inline data retrieval.
Outputs
All input properties are implicitly available as output properties. Additionally, the Index resource produces the following output properties:
- Create
Time string - [Output only] Create time stamp
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. name of resource
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- Create
Time string - [Output only] Create time stamp
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Identifier. name of resource
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - [Output only] Update time stamp
- create_
time string - [Output only] Create time stamp
- effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. name of resource
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time string - [Output only] Update time stamp
- create
Time String - [Output only] Create time stamp
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. name of resource
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
- create
Time string - [Output only] Create time stamp
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Identifier. name of resource
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time string - [Output only] Update time stamp
- create_
time str - [Output only] Create time stamp
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Identifier. name of resource
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time str - [Output only] Update time stamp
- create
Time String - [Output only] Create time stamp
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Identifier. name of resource
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - [Output only] Update time stamp
Look up Existing Index Resource
Get an existing Index 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?: IndexState, opts?: CustomResourceOptions): Index@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
collection_id: Optional[str] = None,
create_time: Optional[str] = None,
dedicated_infrastructure: Optional[IndexDedicatedInfrastructureArgs] = None,
deletion_policy: Optional[str] = None,
dense_scann: Optional[IndexDenseScannArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
distance_metric: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
filter_fields: Optional[Sequence[str]] = None,
index_field: Optional[str] = None,
index_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
store_fields: Optional[Sequence[str]] = None,
update_time: Optional[str] = None) -> Indexfunc GetIndex(ctx *Context, name string, id IDInput, state *IndexState, opts ...ResourceOption) (*Index, error)public static Index Get(string name, Input<string> id, IndexState? state, CustomResourceOptions? opts = null)public static Index get(String name, Output<String> id, IndexState state, CustomResourceOptions options)resources: _: type: gcp:vectorsearch:Index get: id: ${id}import {
to = gcp_vectorsearch_index.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Collection
Id string - The ID of the parent Collection.
- Create
Time string - [Output only] Create time stamp
- Dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- Dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - Description string
- User-specified description of the index
- Display
Name string - User-specified display name of the index
- Distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Filter
Fields List<string> - The fields to push into the index to enable fast ANN inline filtering.
- Index
Field string - The collection schema field to index.
- Index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Labels Dictionary<string, string>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Name string
- Identifier. name of resource
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Store
Fields List<string> - The fields to push into the index to enable inline data retrieval.
- Update
Time string - [Output only] Update time stamp
- Collection
Id string - The ID of the parent Collection.
- Create
Time string - [Output only] Create time stamp
- Dedicated
Infrastructure IndexDedicated Infrastructure Args - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- Dense
Scann IndexDense Scann Args - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - Description string
- User-specified description of the index
- Display
Name string - User-specified display name of the index
- Distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Filter
Fields []string - The fields to push into the index to enable fast ANN inline filtering.
- Index
Field string - The collection schema field to index.
- Index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - Labels map[string]string
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Name string
- Identifier. name of resource
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Store
Fields []string - The fields to push into the index to enable inline data retrieval.
- Update
Time string - [Output only] Update time stamp
- collection_
id string - The ID of the parent Collection.
- create_
time string - [Output only] Create time stamp
- dedicated_
infrastructure object - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense_
scann object - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description string
- User-specified description of the index
- display_
name string - User-specified display name of the index
- distance_
metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- filter_
fields list(string) - The fields to push into the index to enable fast ANN inline filtering.
- index_
field string - The collection schema field to index.
- index_
id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - labels map(string)
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name string
- Identifier. name of resource
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- store_
fields list(string) - The fields to push into the index to enable inline data retrieval.
- update_
time string - [Output only] Update time stamp
- collection
Id String - The ID of the parent Collection.
- create
Time String - [Output only] Create time stamp
- dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description String
- User-specified description of the index
- display
Name String - User-specified display name of the index
- distance
Metric String - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- filter
Fields List<String> - The fields to push into the index to enable fast ANN inline filtering.
- index
Field String - The collection schema field to index.
- index
Id String - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - labels Map<String,String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name String
- Identifier. name of resource
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- store
Fields List<String> - The fields to push into the index to enable inline data retrieval.
- update
Time String - [Output only] Update time stamp
- collection
Id string - The ID of the parent Collection.
- create
Time string - [Output only] Create time stamp
- dedicated
Infrastructure IndexDedicated Infrastructure - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann IndexDense Scann - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description string
- User-specified description of the index
- display
Name string - User-specified display name of the index
- distance
Metric string - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- filter
Fields string[] - The fields to push into the index to enable fast ANN inline filtering.
- index
Field string - The collection schema field to index.
- index
Id string - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - labels {[key: string]: string}
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location string
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name string
- Identifier. name of resource
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- store
Fields string[] - The fields to push into the index to enable inline data retrieval.
- update
Time string - [Output only] Update time stamp
- collection_
id str - The ID of the parent Collection.
- create_
time str - [Output only] Create time stamp
- dedicated_
infrastructure IndexDedicated Infrastructure Args - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense_
scann IndexDense Scann Args - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description str
- User-specified description of the index
- display_
name str - User-specified display name of the index
- distance_
metric str - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- filter_
fields Sequence[str] - The fields to push into the index to enable fast ANN inline filtering.
- index_
field str - The collection schema field to index.
- index_
id str - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - labels Mapping[str, str]
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location str
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name str
- Identifier. name of resource
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- store_
fields Sequence[str] - The fields to push into the index to enable inline data retrieval.
- update_
time str - [Output only] Update time stamp
- collection
Id String - The ID of the parent Collection.
- create
Time String - [Output only] Create time stamp
- dedicated
Infrastructure Property Map - Dedicated infrastructure for the index. This field belongs to the
infraTypeoneof; if omitted, the server populates it with the defaultPERFORMANCE_OPTIMIZEDmode and an autoscaling spec ofmin_replica_count=2,max_replica_count=2. Structure is documented below. - 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.
- dense
Scann Property Map - Dense ScaNN index configuration. This field belongs to the
indexTypeoneof; if omitted, the server populates it with default ScaNN settings. Structure is documented below. - description String
- User-specified description of the index
- display
Name String - User-specified display name of the index
- distance
Metric String - Distance metric used for indexing. If not specified, will default to
DOT_PRODUCT. Possible values are:DOT_PRODUCT,COSINE_DISTANCE. - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- filter
Fields List<String> - The fields to push into the index to enable fast ANN inline filtering.
- index
Field String - The collection schema field to index.
- index
Id String - ID of the Index to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
a-z?. - labels Map<String>
- Labels as key value pairs.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location String
- Resource ID segment making up resource
name. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - name String
- Identifier. name of resource
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- store
Fields List<String> - The fields to push into the index to enable inline data retrieval.
- update
Time String - [Output only] Update time stamp
Supporting Types
IndexDedicatedInfrastructure, IndexDedicatedInfrastructureArgs
- Autoscaling
Spec IndexDedicated Infrastructure Autoscaling Spec - Autoscaling specification. Structure is documented below.
- Mode string
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- Autoscaling
Spec IndexDedicated Infrastructure Autoscaling Spec - Autoscaling specification. Structure is documented below.
- Mode string
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- autoscaling_
spec object - Autoscaling specification. Structure is documented below.
- mode string
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- autoscaling
Spec IndexDedicated Infrastructure Autoscaling Spec - Autoscaling specification. Structure is documented below.
- mode String
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- autoscaling
Spec IndexDedicated Infrastructure Autoscaling Spec - Autoscaling specification. Structure is documented below.
- mode string
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- autoscaling_
spec IndexDedicated Infrastructure Autoscaling Spec - Autoscaling specification. Structure is documented below.
- mode str
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
- autoscaling
Spec Property Map - Autoscaling specification. Structure is documented below.
- mode String
- Mode of the dedicated infrastructure. Defaults to
PERFORMANCE_OPTIMIZED. Possible values are:MODE_UNSPECIFIED,STORAGE_OPTIMIZED,PERFORMANCE_OPTIMIZED.
IndexDedicatedInfrastructureAutoscalingSpec, IndexDedicatedInfrastructureAutoscalingSpecArgs
- Max
Replica intCount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - Min
Replica intCount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- Max
Replica intCount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - Min
Replica intCount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- max_
replica_ numbercount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - min_
replica_ numbercount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- max
Replica IntegerCount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - min
Replica IntegerCount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- max
Replica numberCount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - min
Replica numberCount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- max_
replica_ intcount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - min_
replica_ intcount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
- max
Replica NumberCount - The maximum number of replicas. Must be >=
minReplicaCountand <=1000. If not set or set to0, defaults to the greater ofminReplicaCountand2(or5for the v1beta version). - min
Replica NumberCount - The minimum number of replicas. If not set or set to
0, defaults to2. Must be >=1and <=1000.
IndexDenseScann, IndexDenseScannArgs
- Feature
Norm stringType - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- Feature
Norm stringType - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- feature_
norm_ stringtype - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- feature
Norm StringType - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- feature
Norm stringType - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- feature_
norm_ strtype - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
- feature
Norm StringType - Feature norm type for the ScaNN index.
Possible values are:
FEATURE_NORM_TYPE_UNSPECIFIED,NONE,UNIT_L2_NORM.
Import
Index can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/indexes/{{index_id}}{{project}}/{{location}}/{{collection_id}}/{{index_id}}{{location}}/{{collection_id}}/{{index_id}}
When using the pulumi import command, Index can be imported using one of the formats above. For example:
$ pulumi import gcp:vectorsearch/index:Index default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/indexes/{{index_id}}
$ pulumi import gcp:vectorsearch/index:Index default {{project}}/{{location}}/{{collection_id}}/{{index_id}}
$ pulumi import gcp:vectorsearch/index:Index default {{location}}/{{collection_id}}/{{index_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Wednesday, Jul 29, 2026 by Pulumi