openapi icon indicating copy to clipboard operation
openapi copied to clipboard

Droplet Snapshot Tags

Open frostycoles opened this issue 1 year ago • 2 comments

I cannot find ANY way to tag a droplet snapshot.

  • There is no option to include tags in the request body when snapshotting a droplet
  • Tags do not inherit from the droplet when snapshotting it
  • It is not possible to edit snapshot tags

We should be able to:

  • includeTags when snapshotting a droplet
  • Provide tags: [] when snapshotting a droplet
  • Edit tags on existing snapshots

frostycoles avatar Feb 22 '24 15:02 frostycoles

Hey @frostycoles, thanks for the feedback.

~We currently don't support adding tags to Droplet Snapshots, and don't have any immediate plans to do so. I've shared the feedback with the Droplet product team though, and I'll update this issue if anything changes.~

Edit: Turns out that we do support it!

You can use the Tags API to tag Droplet Snapshots – https://docs.digitalocean.com/reference/api/api-reference/#operation/tags_assign_resources. You'll need to set the resource_type to image.

We don't support it however in the way you requested – you can't set tags when taking a Droplet Snapshot. The tags also aren't inherited when taking a snapshot. I've let the product team know about this, and like I said before, I'll update here if any of those things change.

bentranter avatar Feb 22 '24 16:02 bentranter

I'd like to add on by saying that this feature is important to us folks who are creating DigitalOcean snapshots with Packer. The tags parameter only applies to the droplet, and the snapshot does not inherit the droplet's tags: https://developer.hashicorp.com/packer/integrations/digitalocean/digitalocean/latest/components/builder/digitalocean

The parameter is useless to those of us that want to tag images after using the builder. We have to make a messy cURL post-build and pass the imageID around to make this work. Please either provide the inheritence or add another parameter like snapshot_tags to the builder

Bryan-Lester-Dolby avatar Jul 11 '24 21:07 Bryan-Lester-Dolby