Skip to content

Commit fad69fe

Browse files
fix: add forceNew to google_vertex_ai_featurestore_entitytype_feature value_type field (#7124) (#13491)
Fixes #13485 Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]>
1 parent a27e9ce commit fad69fe

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.changelog/7124.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
vertexai: fixed updating value_type in google_vertex_ai_featurestore_entitytype_feature
3+
```

google/resource_vertex_ai_featurestore_entitytype_feature.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func resourceVertexAIFeaturestoreEntitytypeFeature() *schema.Resource {
5252
"value_type": {
5353
Type: schema.TypeString,
5454
Required: true,
55+
ForceNew: true,
5556
Description: `Type of Feature value. Immutable. https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes.features#ValueType`,
5657
},
5758
"description": {
@@ -243,12 +244,6 @@ func resourceVertexAIFeaturestoreEntitytypeFeatureUpdate(d *schema.ResourceData,
243244
} else if v, ok := d.GetOkExists("description"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) {
244245
obj["description"] = descriptionProp
245246
}
246-
valueTypeProp, err := expandVertexAIFeaturestoreEntitytypeFeatureValueType(d.Get("value_type"), d, config)
247-
if err != nil {
248-
return err
249-
} else if v, ok := d.GetOkExists("value_type"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, valueTypeProp)) {
250-
obj["valueType"] = valueTypeProp
251-
}
252247

253248
url, err := replaceVars(d, config, "{{VertexAIBasePath}}{{entitytype}}/features/{{name}}")
254249
if err != nil {
@@ -265,10 +260,6 @@ func resourceVertexAIFeaturestoreEntitytypeFeatureUpdate(d *schema.ResourceData,
265260
if d.HasChange("description") {
266261
updateMask = append(updateMask, "description")
267262
}
268-
269-
if d.HasChange("value_type") {
270-
updateMask = append(updateMask, "valueType")
271-
}
272263
// updateMask is a URL parameter but not present in the schema, so replaceVars
273264
// won't set it
274265
url, err = addQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")})

0 commit comments

Comments
 (0)