Skip to content

Add CreateTime & UpdateTime to google_dataproc_metastore_federation #9528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/13323.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
metastore: added `CreateTime` and `UpdateTime` fields to `google_dataproc_metastore_federation` resource
```
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ Please refer to the field 'effective_labels' for all of the labels present on th
ForceNew: true,
Description: `The location where the metastore federation should reside.`,
},
"create_time": {
Type: schema.TypeString,
Computed: true,
Description: `Output only. The time when the metastore federation was created.`,
},
"effective_labels": {
Type: schema.TypeMap,
Computed: true,
Expand Down Expand Up @@ -149,6 +154,11 @@ Please refer to the field 'effective_labels' for all of the labels present on th
Computed: true,
Description: `The globally unique resource identifier of the metastore federation.`,
},
"update_time": {
Type: schema.TypeString,
Computed: true,
Description: `Output only. The time when the metastore federation was last updated.`,
},
"project": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -288,6 +298,12 @@ func resourceDataprocMetastoreFederationRead(d *schema.ResourceData, meta interf
if err := d.Set("name", flattenDataprocMetastoreFederationName(res["name"], d, config)); err != nil {
return fmt.Errorf("Error reading Federation: %s", err)
}
if err := d.Set("create_time", flattenDataprocMetastoreFederationCreateTime(res["createTime"], d, config)); err != nil {
return fmt.Errorf("Error reading Federation: %s", err)
}
if err := d.Set("update_time", flattenDataprocMetastoreFederationUpdateTime(res["updateTime"], d, config)); err != nil {
return fmt.Errorf("Error reading Federation: %s", err)
}
if err := d.Set("labels", flattenDataprocMetastoreFederationLabels(res["labels"], d, config)); err != nil {
return fmt.Errorf("Error reading Federation: %s", err)
}
Expand Down Expand Up @@ -487,6 +503,14 @@ func flattenDataprocMetastoreFederationName(v interface{}, d *schema.ResourceDat
return v
}

func flattenDataprocMetastoreFederationCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenDataprocMetastoreFederationUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func flattenDataprocMetastoreFederationLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
if v == nil {
return v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ api_resource_type_kind: 'Federation'
fields:
- field: 'backend_metastores.backend_metastores.metastore_type'
- field: 'backend_metastores.backend_metastores.name'
- field: 'create_time'
- field: 'effective_labels'
provider_only: true
- field: 'endpoint_uri'
Expand All @@ -21,4 +22,5 @@ fields:
- field: 'terraform_labels'
provider_only: true
- field: 'uid'
- field: 'update_time'
- field: 'version'
6 changes: 6 additions & 0 deletions website/docs/r/dataproc_metastore_federation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ In addition to the arguments listed above, the following computed attributes are
* `name` -
The relative resource name of the metastore federation.

* `create_time` -
Output only. The time when the metastore federation was created.

* `update_time` -
Output only. The time when the metastore federation was last updated.

* `endpoint_uri` -
The URI of the endpoint used to access the metastore federation.

Expand Down
Loading