4.4.1
This commit is contained in:
@@ -49,7 +49,7 @@ func dataSourceSnapshotListRead(ctx context.Context, d *schema.ResourceData, m i
|
||||
id := uuid.New()
|
||||
d.SetId(id.String())
|
||||
d.Set("items", flattenSnapshotList(snapshotList))
|
||||
|
||||
d.Set("entry_count", snapshotList.EntryCount)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -69,6 +69,10 @@ func dataSourceSnapshotListSchemaMake() map[string]*schema.Schema {
|
||||
Schema: dataSourceSnapshotSchemaMake(),
|
||||
},
|
||||
},
|
||||
"entry_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
|
||||
return rets
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func flattenSnapshotList(gl *compute.ListSnapShots) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
res := make([]map[string]interface{}, 0, len(gl.Data))
|
||||
for _, item := range gl.Data {
|
||||
temp := map[string]interface{}{
|
||||
"label": item.Label,
|
||||
|
||||
Reference in New Issue
Block a user