Closed maikschneider closed 5 years ago
Hey,
the with_selector
can only be used with the labels. You can create a snapshot with a label and then use the with_selector
property on the hcloud_image
datasource.
Sample:
If the image has a label key=value
, you can use the label selector like this:
data "hcloud_image" "custom_image" {
with_selector = "key=value"
most_recent = true
}
Using the description for this doesn't make so much sense, because the description is only a human-readable "name" for the snapshot.
It should be possible to select created snapshots not only by ID, but by DESCRIPTION (there is no name given for snapshots created with packer.io). Maybe this could be done improving the existing "with_selector", e.g.: