digitalocean / digitalocean/droplet_kit
Volume size ignored when creating from snapshot
- Dominant language
- Ruby
- Stars
- 521
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
When creating a new volume from a snapshot, the specified size is ignored, and the new volume takes on the size of the source snapshot instead.
Steps to reproduce:
```ruby
require 'droplet_kit'
client = DropletKit::Client.new(access_token: 'api_token')
new_volume = DropletKit::Volume.new(
size_gigabytes: 200, # Attempting to create a 200GB volume
name: 'test-volume-from-snapshot',
region: 'nyc1',
snapshot_id: 'snapshot_id'
)
created_volume = client.volumes.create(new_volume)
puts "Created volume size: #{created_volume.size_gigabytes} GB"
```
Expected behavior:
The new volume should be created with the specified size (200GB).
Actual behavior:
The new volume is created with the size of the source snapshot (100 GB), ignoring the specified size_gigabytes parameter.
Environment:
- Ruby version: 3.1.0
- droplet_kit gem version: 3.21.0
- DigitalOcean API version: 2
This behavior makes it impossible to create a larger volume from a snapshot in a single API call.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.