Skip to content

Commit

Permalink
feat(vertexai): support shard_size in google_vertex_ai_index (#82…
Browse files Browse the repository at this point in the history
…93) (#1146)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jul 11, 2023
1 parent efac949 commit ae0b1a4
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ func expandVertexAIIndexMetadataConfig(v interface{}, d tpgresource.TerraformRes
transformed["approximateNeighborsCount"] = transformedApproximateNeighborsCount
}

transformedShardSize, err := expandVertexAIIndexMetadataConfigShardSize(original["shard_size"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedShardSize); val.IsValid() && !tpgresource.IsEmptyValue(val) {
transformed["shardSize"] = transformedShardSize
}

transformedDistanceMeasureType, err := expandVertexAIIndexMetadataConfigDistanceMeasureType(original["distance_measure_type"], d, config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -191,6 +198,10 @@ func expandVertexAIIndexMetadataConfigApproximateNeighborsCount(v interface{}, d
return v, nil
}

func expandVertexAIIndexMetadataConfigShardSize(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandVertexAIIndexMetadataConfigDistanceMeasureType(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}
Expand Down

0 comments on commit ae0b1a4

Please sign in to comment.