Skip to content

Commit 7442f90

Browse files
committed
feat(instance_volume): support migration
1 parent 9ba3580 commit 7442f90

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

internal/services/instance/volume.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ func ResourceVolume() *schema.Resource {
7676
Optional: true,
7777
Description: "The tags associated with the volume",
7878
},
79+
"migrate_to_sbs": {
80+
Type: schema.TypeBool,
81+
Optional: true,
82+
Default: false,
83+
Description: "If true, consider that this volume may have been migrated and no longer exists.",
84+
},
7985
"organization_id": account.OrganizationIDSchema(),
8086
"project_id": account.ProjectIDSchema(),
8187
"zone": zonal.Schema(),
@@ -137,6 +143,10 @@ func ResourceInstanceVolumeRead(ctx context.Context, d *schema.ResourceData, m i
137143
return diag.FromErr(err)
138144
}
139145

146+
if d.Get("migrate_to_sbs").(bool) {
147+
return nil
148+
}
149+
140150
res, err := instanceAPI.GetVolume(&instanceSDK.GetVolumeRequest{
141151
VolumeID: id,
142152
Zone: zone,

0 commit comments

Comments
 (0)