Description
Description:
Add support in the Terraform provider for importing existing Block Storage snapshots into the Terraform state using the terraform import command. This would enable users to manage pre-existing snapshots (e.g., created manually or via another system) using Terraform, improving infrastructure-as-code practices and lifecycle consistency.
Context:
Currently, the Terraform provider does not support importing Block Storage snapshots, which limits the ability to:
Adopt Terraform for existing infrastructure
Manage snapshots created outside of Terraform
Implement automated disaster recovery or migration scenarios involving external snapshots
Expected Behavior:
Users can run terraform import with the snapshot ID to bring it under Terraform management.
After import, the resource block reflects the correct attributes (e.g., volume type, zone, size, creation date).
Supports both manual and programmatically created snapshots.
Example Usage:
`
resource "scaleway_block_snapshot" "example" {
name = "my-snapshot"
zone = "fr-par-1"
}
terraform import scaleway_block_snapshot.example fr-par-1/snap-12345678
`