Skip to content

Commit

Permalink
add update support to big_query field on google_vertex_ai_feature_gro…
Browse files Browse the repository at this point in the history
…up resource (#10974) (#18493)

[upstream:20507bcda76c1276bcd257a12b9ad761b5cc170e]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jun 20, 2024
1 parent 27fc8ec commit f9ebf3f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/10974.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
vertexai: added update support for `big_query.entity_id_columns` field on `google_vertex_ai_feature_group` resource
```
4 changes: 2 additions & 2 deletions google/services/vertexai/resource_vertex_ai_feature_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func ResourceVertexAIFeatureGroup() *schema.Resource {
"entity_id_columns": {
Type: schema.TypeList,
Optional: true,
Description: `Columns to construct entityId / row keys. Currently only supports 1 entity_id_column. If not provided defaults to entityId.`,
Description: `Columns to construct entityId / row keys. If not provided defaults to entityId.`,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Expand Down Expand Up @@ -385,7 +385,7 @@ func resourceVertexAIFeatureGroupUpdate(d *schema.ResourceData, meta interface{}
}

if d.HasChange("big_query") {
updateMask = append(updateMask, "bigQuery")
updateMask = append(updateMask, "bigQuery.entityIdColumns")
}

if d.HasChange("effective_labels") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ resource "google_bigquery_table" "sample_table" {
"type": "STRING",
"mode": "NULLABLE"
},
{
"name": "test_entity_column",
"type": "STRING",
"mode": "NULLABLE",
"description": "test secondary entity column"
},
{
"name": "feature_timestamp",
"type": "TIMESTAMP",
Expand All @@ -105,7 +111,7 @@ func testAccVertexAIFeatureGroup_updated(context map[string]interface{}) string
big_query_source {
input_uri = "bq://${google_bigquery_table.sample_table.project}.${google_bigquery_table.sample_table.dataset_id}.${google_bigquery_table.sample_table.table_id}"
}
entity_id_columns = ["feature_id"]
entity_id_columns = ["feature_id","test_entity_column"]
}
}
Expand All @@ -128,6 +134,12 @@ resource "google_bigquery_table" "sample_table" {
"type": "STRING",
"mode": "NULLABLE"
},
{
"name": "test_entity_column",
"type": "STRING",
"mode": "NULLABLE",
"description": "test secondary entity column"
},
{
"name": "feature_timestamp",
"type": "TIMESTAMP",
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/vertex_ai_feature_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The following arguments are supported:

* `entity_id_columns` -
(Optional)
Columns to construct entityId / row keys. Currently only supports 1 entity_id_column. If not provided defaults to entityId.
Columns to construct entityId / row keys. If not provided defaults to entityId.


<a name="nested_big_query_source"></a>The `big_query_source` block supports:
Expand Down

0 comments on commit f9ebf3f

Please sign in to comment.