|
7 | 7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" |
8 | 8 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" |
9 | 9 | block "github.com/scaleway/scaleway-sdk-go/api/block/v1alpha1" |
10 | | - "github.com/scaleway/scaleway-sdk-go/logger" |
11 | 10 | "github.com/scaleway/scaleway-sdk-go/scw" |
| 11 | + "github.com/scaleway/terraform-provider-scaleway/v2/internal/dsf" |
12 | 12 | "github.com/scaleway/terraform-provider-scaleway/v2/internal/httperrors" |
13 | 13 | "github.com/scaleway/terraform-provider-scaleway/v2/internal/locality" |
14 | 14 | "github.com/scaleway/terraform-provider-scaleway/v2/internal/locality/zonal" |
@@ -52,9 +52,10 @@ func ResourceVolume() *schema.Resource { |
52 | 52 | Description: "The volume size in GB", |
53 | 53 | }, |
54 | 54 | "snapshot_id": { |
55 | | - Type: schema.TypeString, |
56 | | - Optional: true, |
57 | | - Description: "The snapshot to create the volume from", |
| 55 | + Type: schema.TypeString, |
| 56 | + Optional: true, |
| 57 | + Description: "The snapshot to create the volume from", |
| 58 | + DiffSuppressFunc: dsf.Locality, |
58 | 59 | }, |
59 | 60 | "instance_volume_id": { |
60 | 61 | Type: schema.TypeString, |
@@ -173,7 +174,6 @@ func ResourceBlockVolumeRead(ctx context.Context, d *schema.ResourceData, m any) |
173 | 174 | snapshotID := "" |
174 | 175 |
|
175 | 176 | if volume.ParentSnapshotID != nil { |
176 | | - logger.Debugf("found snapshot In READ %s", volume.ParentSnapshotID) |
177 | 177 | _, err := api.GetSnapshot(&block.GetSnapshotRequest{ |
178 | 178 | SnapshotID: *volume.ParentSnapshotID, |
179 | 179 | Zone: zone, |
|
0 commit comments