Skip to content

Add Support for Snapshots#129

Merged
alakae merged 13 commits intomasterfrom
alain/snaps
May 4, 2026
Merged

Add Support for Snapshots#129
alakae merged 13 commits intomasterfrom
alain/snaps

Conversation

@alakae
Copy link
Copy Markdown
Contributor

@alakae alakae commented Apr 16, 2026

In scope:

  • Volume snapshot resource and data source.
  • Creating new volume from snapshots
    • and scale up and/or attach
    • delete source snapshot and volume

Out of scope:

  • Revert volume to previous snapshot

Closes #92

Copy link
Copy Markdown

@mweibel mweibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall - I have a few questions.
The tests didn't go through but judging by the tests these were because of unrelated issues. I think you addressed those in a separate PR, right?

Comment thread cloudscale/resource_cloudscale_volume.go
Comment thread cloudscale/resource_cloudscale_volume.go
Comment thread cloudscale/resource_cloudscale_volume_snapshot.go
Comment thread cloudscale/resource_cloudscale_volume_snapshot.go
Comment thread cloudscale/resource_cloudscale_volume_snapshot_test.go Outdated
Comment thread cloudscale/resource_cloudscale_volume_snapshot.go Outdated
@alakae
Copy link
Copy Markdown
Contributor Author

alakae commented Apr 29, 2026

I think you addressed those in a separate PR, right?

Yes.

Copy link
Copy Markdown

@mweibel mweibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me, just two small things to comment, and a note to not forget updating the dependency again.

Comment thread cloudscale/resource_cloudscale_custom_image_test.go
Comment thread cloudscale/resource_cloudscale_volume_snapshot.go
Comment thread cloudscale/resource_cloudscale_server.go
Comment thread go.mod Outdated
alakae added 11 commits May 4, 2026 16:00
The cloudscale API only accepts name, volume_snapshot_uuid, and tags
when creating a volume from a snapshot. To let users specify size_gb
and server_uuids alongside a snapshot, the provider now creates the
volume first, then resizes and/or attaches via Update calls.

Use resourceName variable consistently in volume tests.
All resources that wait for a status during create (server, load balancer,
volume snapshot) made two API calls per poll: one via the generic Read
helper to populate schema.ResourceData, then a second direct Get to obtain
the object. Replace both with a single Get and look up the attribute via
the existing gather*ResourceData function.
@alakae alakae force-pushed the alain/snaps branch 2 times, most recently from a6c6f19 to 92c9c90 Compare May 4, 2026 14:01
@alakae alakae merged commit 5185e1f into master May 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volume Snapshots APIs are not supported

2 participants