Skip to content

Support import for Block Storage Snapshot #3090

@Laure-di

Description

@Laure-di

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
`

Metadata

Metadata

Assignees

Labels

enhancementpriority:highNew featuressbsScaleway Block Storage issues, bugs and feature requests

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions