You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for your work with maintaining this plugin. I am quite new to Hetzner Cloud and would like to know if there any way to use snapshots as an image of the server, using your plugin?
The text was updated successfully, but these errors were encountered:
Hello,
I haven't tried yet, but it should be possible by passing the snapshot ID (which is an integer) as a string to the parameter hcloud_image of this plugin.
This "gotcha" is not specific to this plugin: also if you were to use just Terraform, you would need a way to find the ID, because the name works only for Hetzner-provided images, not for user snapshots.
For example, I use Packer to build snapshots, and use a label like this:
source "hcloud.cfg" {
name = "core"
snapshot_name = "myimage"
snapshot_labels = {
"name" : "myimage" <== HERE
}
}
just to be able then in Terraform to find it as:
data "hcloud_image" "myimage" {
with_selector = "name=myimage" <== looking up the label above
}
Note that you do not need to pass via Packer. Also if you took the snapshot from the webconsole, you could add a label and then use the same Terraform (or Pulumi) logic to find it.
Hi there,
First of all, thanks for your work with maintaining this plugin. I am quite new to Hetzner Cloud and would like to know if there any way to use snapshots as an image of the server, using your plugin?
The text was updated successfully, but these errors were encountered: