4.3.0
This commit is contained in:
@@ -5,9 +5,9 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/compute"
|
||||
)
|
||||
|
||||
func flattenSnapshotList(gl compute.ListSnapShots) []map[string]interface{} {
|
||||
func flattenSnapshotList(gl *compute.ListSnapShots) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0)
|
||||
for _, item := range gl {
|
||||
for _, item := range gl.Data {
|
||||
temp := map[string]interface{}{
|
||||
"label": item.Label,
|
||||
"guid": item.GUID,
|
||||
|
||||
@@ -54,7 +54,7 @@ func utilitySnapshotCheckPresence(ctx context.Context, d *schema.ResourceData, m
|
||||
findId = d.Id()
|
||||
}
|
||||
|
||||
for _, s := range snapShotList {
|
||||
for _, s := range snapShotList.Data {
|
||||
if s.GUID == findId {
|
||||
return &s, nil
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/controller"
|
||||
)
|
||||
|
||||
func utilitySnapshotListCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (compute.ListSnapShots, error) {
|
||||
func utilitySnapshotListCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (*compute.ListSnapShots, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := compute.SnapshotListRequest{
|
||||
ComputeID: uint64(d.Get("compute_id").(int)),
|
||||
|
||||
Reference in New Issue
Block a user