@@ -49,6 +49,11 @@ func resourceVertexAIFeaturestoreEntitytype() *schema.Resource {
49
49
ForceNew : true ,
50
50
Description : `The name of the Featurestore to use, in the format projects/{project}/locations/{location}/featurestores/{featurestore}.` ,
51
51
},
52
+ "description" : {
53
+ Type : schema .TypeString ,
54
+ Optional : true ,
55
+ Description : `Optional. Description of the EntityType.` ,
56
+ },
52
57
"labels" : {
53
58
Type : schema .TypeMap ,
54
59
Optional : true ,
@@ -192,6 +197,12 @@ func resourceVertexAIFeaturestoreEntitytypeCreate(d *schema.ResourceData, meta i
192
197
}
193
198
194
199
obj := make (map [string ]interface {})
200
+ descriptionProp , err := expandVertexAIFeaturestoreEntitytypeDescription (d .Get ("description" ), d , config )
201
+ if err != nil {
202
+ return err
203
+ } else if v , ok := d .GetOkExists ("description" ); ! isEmptyValue (reflect .ValueOf (descriptionProp )) && (ok || ! reflect .DeepEqual (v , descriptionProp )) {
204
+ obj ["description" ] = descriptionProp
205
+ }
195
206
labelsProp , err := expandVertexAIFeaturestoreEntitytypeLabels (d .Get ("labels" ), d , config )
196
207
if err != nil {
197
208
return err
@@ -293,6 +304,9 @@ func resourceVertexAIFeaturestoreEntitytypeRead(d *schema.ResourceData, meta int
293
304
return handleNotFoundError (err , d , fmt .Sprintf ("VertexAIFeaturestoreEntitytype %q" , d .Id ()))
294
305
}
295
306
307
+ if err := d .Set ("description" , flattenVertexAIFeaturestoreEntitytypeDescription (res ["description" ], d , config )); err != nil {
308
+ return fmt .Errorf ("Error reading FeaturestoreEntitytype: %s" , err )
309
+ }
296
310
if err := d .Set ("create_time" , flattenVertexAIFeaturestoreEntitytypeCreateTime (res ["createTime" ], d , config )); err != nil {
297
311
return fmt .Errorf ("Error reading FeaturestoreEntitytype: %s" , err )
298
312
}
@@ -319,6 +333,12 @@ func resourceVertexAIFeaturestoreEntitytypeUpdate(d *schema.ResourceData, meta i
319
333
billingProject := ""
320
334
321
335
obj := make (map [string ]interface {})
336
+ descriptionProp , err := expandVertexAIFeaturestoreEntitytypeDescription (d .Get ("description" ), d , config )
337
+ if err != nil {
338
+ return err
339
+ } else if v , ok := d .GetOkExists ("description" ); ! isEmptyValue (reflect .ValueOf (v )) && (ok || ! reflect .DeepEqual (v , descriptionProp )) {
340
+ obj ["description" ] = descriptionProp
341
+ }
322
342
labelsProp , err := expandVertexAIFeaturestoreEntitytypeLabels (d .Get ("labels" ), d , config )
323
343
if err != nil {
324
344
return err
@@ -345,6 +365,10 @@ func resourceVertexAIFeaturestoreEntitytypeUpdate(d *schema.ResourceData, meta i
345
365
log .Printf ("[DEBUG] Updating FeaturestoreEntitytype %q: %#v" , d .Id (), obj )
346
366
updateMask := []string {}
347
367
368
+ if d .HasChange ("description" ) {
369
+ updateMask = append (updateMask , "description" )
370
+ }
371
+
348
372
if d .HasChange ("labels" ) {
349
373
updateMask = append (updateMask , "labels" )
350
374
}
@@ -449,6 +473,10 @@ func resourceVertexAIFeaturestoreEntitytypeImport(d *schema.ResourceData, meta i
449
473
return []* schema.ResourceData {d }, nil
450
474
}
451
475
476
+ func flattenVertexAIFeaturestoreEntitytypeDescription (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
477
+ return v
478
+ }
479
+
452
480
func flattenVertexAIFeaturestoreEntitytypeCreateTime (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
453
481
return v
454
482
}
@@ -592,6 +620,10 @@ func flattenVertexAIFeaturestoreEntitytypeMonitoringConfigCategoricalThresholdCo
592
620
return v
593
621
}
594
622
623
+ func expandVertexAIFeaturestoreEntitytypeDescription (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
624
+ return v , nil
625
+ }
626
+
595
627
func expandVertexAIFeaturestoreEntitytypeLabels (v interface {}, d TerraformResourceData , config * Config ) (map [string ]string , error ) {
596
628
if v == nil {
597
629
return map [string ]string {}, nil
0 commit comments