Skip to content

Commit 73facb8

Browse files
authored
feat(registry_image): add updated_at attribute to datasource (#2319)
* feat(registry_image): add updated_at attribute to datasource * flattenTime
1 parent d7ac009 commit 73facb8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/data-sources/registry_image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ In addition to all above arguments, the following attributes are exported:
4848
- `visibility` - The privacy policy of the registry image.
4949
- `tags` - The tags associated with the registry image
5050
- `organization_id` - The organization ID the image is associated with.
51+
- `updated_at` - The date the image of the last update

scaleway/data_source_registry_image.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ func dataSourceScalewayRegistryImage() *schema.Resource {
4949
},
5050
Description: "The tags associated with the registry image",
5151
},
52+
"updated_at": {
53+
Computed: true,
54+
Type: schema.TypeString,
55+
},
5256
"region": regionSchema(),
5357
"organization_id": organizationIDSchema(),
5458
"project_id": projectIDSchema(),
@@ -106,6 +110,7 @@ func dataSourceScalewayRegistryImageRead(d *schema.ResourceData, meta interface{
106110
_ = d.Set("visibility", image.Visibility.String())
107111
_ = d.Set("size", int(image.Size))
108112
_ = d.Set("tags", image.Tags)
113+
_ = d.Set("updated_at", flattenTime(image.UpdatedAt))
109114

110115
return nil
111116
}

0 commit comments

Comments
 (0)