diff --git a/docs/guides/migrate-instance-volume-to-sbs.md b/docs/guides/migrate-instance-volume-to-sbs.md deleted file mode 100644 index 80acc25ee..000000000 --- a/docs/guides/migrate-instance-volume-to-sbs.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -page_title: "Migrating the management of Instance Block Storage volumes to SBS" ---- - -# Migration - -This page describes how to migrate the management of your Instance's volumes from Block Storage legacy to SBS (Scaleway Block Storage). -This documentation **only applies if you have created Block Storage legacy volumes** (`b_ssd`). - -Migration of local volumes is not supported, you will have to migrate your data manually. - -Find out about the advantages of migrating from the Instance API to the Block Storage API for managing block volumes in the [dedicated documentation](https://www.scaleway.com/en/docs/block-storage/reference-content/advantages-migrating-to-sbs/). - -## Migrate your implicit root_volume - -If your infrastructure includes a server with a root volume that must be migrated: - -```terraform -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - image = "ubuntu_jammy" - root_volume { - volume_type = "b_ssd" - } -} -``` - -In the snippet above, the `root_volume` type is explicitly configured as a `b_ssd`. This configuration must be removed to prepare for migration. - -```terraform -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - image = "ubuntu_jammy" -} -``` - -You can now migrate your root_volume using the [Scaleway CLI documentation](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/#migrating-an-existing-block-storage-volume-to-scaleway-block-storage-management). -After migration, the output when running `terraform plan` should be empty as the provider should have picked up that the volume is now managed by the Scaleway Block Storage API. - -## Migrate your explicit volumes - -If your infrastructure includes servers and explicit volumes. - -```terraform -resource scaleway_instance_volume "root_volume" { - size_in_gb = 20 - type = "b_ssd" -} - -resource scaleway_instance_volume "volume" { - size_in_gb = 20 - type = "b_ssd" -} - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_instance_volume.root_volume.id - } - - additional_volume_ids = [scaleway_instance_volume.volume.id] -} -``` - -You can rely on Terraform to perform the migration which will be done in 2 steps. -The first one will be a transitional state to migrate and is described in the next snippet. -In this snippet, the `migrate_to_sbs` field will prevent the old volume state from being updated during the migration. - - -```terraform -resource scaleway_instance_volume "root_volume" { - size_in_gb = 20 - type = "b_ssd" - migrate_to_sbs = true # Mark migration to avoid failure -} - -resource scaleway_block_volume "root_volume" { - size_in_gb = 20 - iops = 5000 # b_ssd is a 5000 iops volume - instance_volume_id = scaleway_instance_volume.root_volume.id # block resource will handle migration -} - -resource scaleway_instance_volume "volume" { - size_in_gb = 20 - type = "b_ssd" - migrate_to_sbs = true # Mark migration to avoid failure -} - -resource scaleway_block_volume "volume" { - size_in_gb = 20 - iops = 5000 # b_ssd is a 5000 iops volume - instance_volume_id = scaleway_instance_volume.volume.id # block resource will handle migration -} - - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_block_volume.root_volume.id # Start using your new resource - } - - additional_volume_ids = [scaleway_block_volume.volume.id] # Start using your new resource -} -``` - -The first migration step should have created your new Block Storage volumes and updated the existing instance_volume resources. -After confirming the migration is successful, you must remove the old Instance's resources manually. -Terraform's scaleway_instance_volume resource cannot delete a volume that has been migrated to the Scaleway Block Storage API. Before applying the final step, check in the Scaleway [console](https://console.scaleway.com) or using the [CLI](https://cli.scaleway.com/block/#list-volumes) to confirm that your volume was successfully migrated. - - -```terraform -resource scaleway_block_volume "root_volume" { - size_in_gb = 20 - iops = 5000 -} - -resource scaleway_block_volume "volume" { - size_in_gb = 20 - iops = 5000 -} - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_block_volume.root_volume.id - } - - additional_volume_ids = [scaleway_block_volume.volume.id] -} -``` diff --git a/docs/resources/instance_snapshot.md b/docs/resources/instance_snapshot.md index c3ec5d238..3fdbdc0f6 100644 --- a/docs/resources/instance_snapshot.md +++ b/docs/resources/instance_snapshot.md @@ -72,11 +72,6 @@ The following arguments are supported: - `volume_id` - (Optional) The ID of the volume to take a snapshot from. - `type` - (Default to `l_ssd`) The snapshot's volume type. The possible values are: `l_ssd` (Local SSD). Updates to this field will recreate a new resource. - -~> **Important:** Snapshots of volumes with type `b_ssd` (Block SSD) are deprecated and cannot be managed using the `scaleway_instance_snapshot` resource anymore. Please use the `scaleway_block_snapshot` resource instead. -If you want to migrate existing snapshots, you can visit [this page](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/) for more information. -~> **Important:** Snapshots of volumes with type `unified` (can be used with both Block and Local SSD) are deprecated since the migration to SBS. - - `name` - (Optional) The name of the snapshot. If not provided it will be randomly generated. - `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the snapshot should be created. diff --git a/docs/resources/instance_volume.md b/docs/resources/instance_volume.md index ebde99f59..98b0eea25 100644 --- a/docs/resources/instance_volume.md +++ b/docs/resources/instance_volume.md @@ -23,10 +23,6 @@ resource "scaleway_instance_volume" "server_volume" { The following arguments are supported: - `type` - (Required) The type of the volume. The possible values are: `l_ssd` (Local SSD), `scratch` (Local Scratch SSD). - -~> **Important:** Volumes with type `b_ssd` (Block SSD) are deprecated and cannot be managed using the `scaleway_instance_volume` resource anymore. Please use the `scaleway_block_volume` resource instead. -If you want to migrate existing volumes, you can visit [this page](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/) for more information. - - `size_in_gb` - (Optional) The size of the volume. Only one of `size_in_gb` and `from_snapshot_id` should be specified. - `from_snapshot_id` - (Optional) If set, the new volume will be created from this snapshot. Only one of `size_in_gb` and `from_snapshot_id` should be specified. - `name` - (Optional) The name of the volume. If not provided it will be randomly generated. diff --git a/templates/guides/migrate-instance-volume-to-sbs.md b/templates/guides/migrate-instance-volume-to-sbs.md deleted file mode 100644 index 80acc25ee..000000000 --- a/templates/guides/migrate-instance-volume-to-sbs.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -page_title: "Migrating the management of Instance Block Storage volumes to SBS" ---- - -# Migration - -This page describes how to migrate the management of your Instance's volumes from Block Storage legacy to SBS (Scaleway Block Storage). -This documentation **only applies if you have created Block Storage legacy volumes** (`b_ssd`). - -Migration of local volumes is not supported, you will have to migrate your data manually. - -Find out about the advantages of migrating from the Instance API to the Block Storage API for managing block volumes in the [dedicated documentation](https://www.scaleway.com/en/docs/block-storage/reference-content/advantages-migrating-to-sbs/). - -## Migrate your implicit root_volume - -If your infrastructure includes a server with a root volume that must be migrated: - -```terraform -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - image = "ubuntu_jammy" - root_volume { - volume_type = "b_ssd" - } -} -``` - -In the snippet above, the `root_volume` type is explicitly configured as a `b_ssd`. This configuration must be removed to prepare for migration. - -```terraform -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - image = "ubuntu_jammy" -} -``` - -You can now migrate your root_volume using the [Scaleway CLI documentation](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/#migrating-an-existing-block-storage-volume-to-scaleway-block-storage-management). -After migration, the output when running `terraform plan` should be empty as the provider should have picked up that the volume is now managed by the Scaleway Block Storage API. - -## Migrate your explicit volumes - -If your infrastructure includes servers and explicit volumes. - -```terraform -resource scaleway_instance_volume "root_volume" { - size_in_gb = 20 - type = "b_ssd" -} - -resource scaleway_instance_volume "volume" { - size_in_gb = 20 - type = "b_ssd" -} - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_instance_volume.root_volume.id - } - - additional_volume_ids = [scaleway_instance_volume.volume.id] -} -``` - -You can rely on Terraform to perform the migration which will be done in 2 steps. -The first one will be a transitional state to migrate and is described in the next snippet. -In this snippet, the `migrate_to_sbs` field will prevent the old volume state from being updated during the migration. - - -```terraform -resource scaleway_instance_volume "root_volume" { - size_in_gb = 20 - type = "b_ssd" - migrate_to_sbs = true # Mark migration to avoid failure -} - -resource scaleway_block_volume "root_volume" { - size_in_gb = 20 - iops = 5000 # b_ssd is a 5000 iops volume - instance_volume_id = scaleway_instance_volume.root_volume.id # block resource will handle migration -} - -resource scaleway_instance_volume "volume" { - size_in_gb = 20 - type = "b_ssd" - migrate_to_sbs = true # Mark migration to avoid failure -} - -resource scaleway_block_volume "volume" { - size_in_gb = 20 - iops = 5000 # b_ssd is a 5000 iops volume - instance_volume_id = scaleway_instance_volume.volume.id # block resource will handle migration -} - - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_block_volume.root_volume.id # Start using your new resource - } - - additional_volume_ids = [scaleway_block_volume.volume.id] # Start using your new resource -} -``` - -The first migration step should have created your new Block Storage volumes and updated the existing instance_volume resources. -After confirming the migration is successful, you must remove the old Instance's resources manually. -Terraform's scaleway_instance_volume resource cannot delete a volume that has been migrated to the Scaleway Block Storage API. Before applying the final step, check in the Scaleway [console](https://console.scaleway.com) or using the [CLI](https://cli.scaleway.com/block/#list-volumes) to confirm that your volume was successfully migrated. - - -```terraform -resource scaleway_block_volume "root_volume" { - size_in_gb = 20 - iops = 5000 -} - -resource scaleway_block_volume "volume" { - size_in_gb = 20 - iops = 5000 -} - -resource scaleway_instance_server "server" { - type = "PLAY2-PICO" - root_volume { - volume_id = scaleway_block_volume.root_volume.id - } - - additional_volume_ids = [scaleway_block_volume.volume.id] -} -``` diff --git a/templates/resources/instance_snapshot.md.tmpl b/templates/resources/instance_snapshot.md.tmpl index c3ec5d238..3fdbdc0f6 100644 --- a/templates/resources/instance_snapshot.md.tmpl +++ b/templates/resources/instance_snapshot.md.tmpl @@ -72,11 +72,6 @@ The following arguments are supported: - `volume_id` - (Optional) The ID of the volume to take a snapshot from. - `type` - (Default to `l_ssd`) The snapshot's volume type. The possible values are: `l_ssd` (Local SSD). Updates to this field will recreate a new resource. - -~> **Important:** Snapshots of volumes with type `b_ssd` (Block SSD) are deprecated and cannot be managed using the `scaleway_instance_snapshot` resource anymore. Please use the `scaleway_block_snapshot` resource instead. -If you want to migrate existing snapshots, you can visit [this page](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/) for more information. -~> **Important:** Snapshots of volumes with type `unified` (can be used with both Block and Local SSD) are deprecated since the migration to SBS. - - `name` - (Optional) The name of the snapshot. If not provided it will be randomly generated. - `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the snapshot should be created. diff --git a/templates/resources/instance_volume.md.tmpl b/templates/resources/instance_volume.md.tmpl index ebde99f59..98b0eea25 100644 --- a/templates/resources/instance_volume.md.tmpl +++ b/templates/resources/instance_volume.md.tmpl @@ -23,10 +23,6 @@ resource "scaleway_instance_volume" "server_volume" { The following arguments are supported: - `type` - (Required) The type of the volume. The possible values are: `l_ssd` (Local SSD), `scratch` (Local Scratch SSD). - -~> **Important:** Volumes with type `b_ssd` (Block SSD) are deprecated and cannot be managed using the `scaleway_instance_volume` resource anymore. Please use the `scaleway_block_volume` resource instead. -If you want to migrate existing volumes, you can visit [this page](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/) for more information. - - `size_in_gb` - (Optional) The size of the volume. Only one of `size_in_gb` and `from_snapshot_id` should be specified. - `from_snapshot_id` - (Optional) If set, the new volume will be created from this snapshot. Only one of `size_in_gb` and `from_snapshot_id` should be specified. - `name` - (Optional) The name of the volume. If not provided it will be randomly generated.