Skip to content

Commit 5699168

Browse files
Add CreateTime & UpdateTime to google_dataproc_metastore_federation (#13323) (#9528)
[upstream:634b38243e19d4075310444e5531a8927621a70e] Signed-off-by: Modular Magician <[email protected]>
1 parent 1b6b0a5 commit 5699168

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

Diff for: .changelog/13323.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
metastore: added `CreateTime` and `UpdateTime` fields to `google_dataproc_metastore_federation` resource
3+
```

Diff for: google-beta/services/dataprocmetastore/resource_dataproc_metastore_federation.go

+24
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ Please refer to the field 'effective_labels' for all of the labels present on th
111111
ForceNew: true,
112112
Description: `The location where the metastore federation should reside.`,
113113
},
114+
"create_time": {
115+
Type: schema.TypeString,
116+
Computed: true,
117+
Description: `Output only. The time when the metastore federation was created.`,
118+
},
114119
"effective_labels": {
115120
Type: schema.TypeMap,
116121
Computed: true,
@@ -149,6 +154,11 @@ Please refer to the field 'effective_labels' for all of the labels present on th
149154
Computed: true,
150155
Description: `The globally unique resource identifier of the metastore federation.`,
151156
},
157+
"update_time": {
158+
Type: schema.TypeString,
159+
Computed: true,
160+
Description: `Output only. The time when the metastore federation was last updated.`,
161+
},
152162
"project": {
153163
Type: schema.TypeString,
154164
Optional: true,
@@ -288,6 +298,12 @@ func resourceDataprocMetastoreFederationRead(d *schema.ResourceData, meta interf
288298
if err := d.Set("name", flattenDataprocMetastoreFederationName(res["name"], d, config)); err != nil {
289299
return fmt.Errorf("Error reading Federation: %s", err)
290300
}
301+
if err := d.Set("create_time", flattenDataprocMetastoreFederationCreateTime(res["createTime"], d, config)); err != nil {
302+
return fmt.Errorf("Error reading Federation: %s", err)
303+
}
304+
if err := d.Set("update_time", flattenDataprocMetastoreFederationUpdateTime(res["updateTime"], d, config)); err != nil {
305+
return fmt.Errorf("Error reading Federation: %s", err)
306+
}
291307
if err := d.Set("labels", flattenDataprocMetastoreFederationLabels(res["labels"], d, config)); err != nil {
292308
return fmt.Errorf("Error reading Federation: %s", err)
293309
}
@@ -487,6 +503,14 @@ func flattenDataprocMetastoreFederationName(v interface{}, d *schema.ResourceDat
487503
return v
488504
}
489505

506+
func flattenDataprocMetastoreFederationCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
507+
return v
508+
}
509+
510+
func flattenDataprocMetastoreFederationUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
511+
return v
512+
}
513+
490514
func flattenDataprocMetastoreFederationLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
491515
if v == nil {
492516
return v

Diff for: google-beta/services/dataprocmetastore/resource_dataproc_metastore_federation_generated_meta.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ api_resource_type_kind: 'Federation'
77
fields:
88
- field: 'backend_metastores.backend_metastores.metastore_type'
99
- field: 'backend_metastores.backend_metastores.name'
10+
- field: 'create_time'
1011
- field: 'effective_labels'
1112
provider_only: true
1213
- field: 'endpoint_uri'
@@ -21,4 +22,5 @@ fields:
2122
- field: 'terraform_labels'
2223
provider_only: true
2324
- field: 'uid'
25+
- field: 'update_time'
2426
- field: 'version'

Diff for: website/docs/r/dataproc_metastore_federation.html.markdown

+6
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ In addition to the arguments listed above, the following computed attributes are
160160
* `name` -
161161
The relative resource name of the metastore federation.
162162

163+
* `create_time` -
164+
Output only. The time when the metastore federation was created.
165+
166+
* `update_time` -
167+
Output only. The time when the metastore federation was last updated.
168+
163169
* `endpoint_uri` -
164170
The URI of the endpoint used to access the metastore federation.
165171

0 commit comments

Comments
 (0)