This commit is contained in:
2023-07-26 13:32:39 +03:00
parent f731cf246f
commit 272e385318
167 changed files with 5194 additions and 890 deletions

View File

@@ -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,

View File

@@ -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
}

View File

@@ -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)),