@@ -165,6 +165,17 @@ Required if tree-AH algorithm is used.`,
165
165
* NONE: No normalization type is specified.` ,
166
166
Default : "NONE" ,
167
167
},
168
+ "shard_size" : {
169
+ Type : schema .TypeString ,
170
+ Computed : true ,
171
+ Optional : true ,
172
+ ForceNew : true ,
173
+ Description : `Index data is split into equal parts to be processed. These are called "shards".
174
+ The shard size must be specified when creating an index. The value must be one of the followings:
175
+ * SHARD_SIZE_SMALL: Small (2GB)
176
+ * SHARD_SIZE_MEDIUM: Medium (20GB)
177
+ * SHARD_SIZE_LARGE: Large (50GB)` ,
178
+ },
168
179
},
169
180
},
170
181
},
@@ -706,6 +717,8 @@ func flattenVertexAIIndexMetadataConfig(v interface{}, d *schema.ResourceData, c
706
717
flattenVertexAIIndexMetadataConfigDimensions (original ["dimensions" ], d , config )
707
718
transformed ["approximate_neighbors_count" ] =
708
719
flattenVertexAIIndexMetadataConfigApproximateNeighborsCount (original ["approximateNeighborsCount" ], d , config )
720
+ transformed ["shard_size" ] =
721
+ flattenVertexAIIndexMetadataConfigShardSize (original ["shardSize" ], d , config )
709
722
transformed ["distance_measure_type" ] =
710
723
flattenVertexAIIndexMetadataConfigDistanceMeasureType (original ["distanceMeasureType" ], d , config )
711
724
transformed ["feature_norm_type" ] =
@@ -748,6 +761,10 @@ func flattenVertexAIIndexMetadataConfigApproximateNeighborsCount(v interface{},
748
761
return v // let terraform core handle it otherwise
749
762
}
750
763
764
+ func flattenVertexAIIndexMetadataConfigShardSize (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
765
+ return v
766
+ }
767
+
751
768
func flattenVertexAIIndexMetadataConfigDistanceMeasureType (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
752
769
return v
753
770
}
@@ -983,6 +1000,13 @@ func expandVertexAIIndexMetadataConfig(v interface{}, d tpgresource.TerraformRes
983
1000
transformed ["approximateNeighborsCount" ] = transformedApproximateNeighborsCount
984
1001
}
985
1002
1003
+ transformedShardSize , err := expandVertexAIIndexMetadataConfigShardSize (original ["shard_size" ], d , config )
1004
+ if err != nil {
1005
+ return nil , err
1006
+ } else if val := reflect .ValueOf (transformedShardSize ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
1007
+ transformed ["shardSize" ] = transformedShardSize
1008
+ }
1009
+
986
1010
transformedDistanceMeasureType , err := expandVertexAIIndexMetadataConfigDistanceMeasureType (original ["distance_measure_type" ], d , config )
987
1011
if err != nil {
988
1012
return nil , err
@@ -1015,6 +1039,10 @@ func expandVertexAIIndexMetadataConfigApproximateNeighborsCount(v interface{}, d
1015
1039
return v , nil
1016
1040
}
1017
1041
1042
+ func expandVertexAIIndexMetadataConfigShardSize (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
1043
+ return v , nil
1044
+ }
1045
+
1018
1046
func expandVertexAIIndexMetadataConfigDistanceMeasureType (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
1019
1047
return v , nil
1020
1048
}
0 commit comments