Closed andrewhamon closed 1 month ago
Actually, this seems to be happening in tart itself. tart clone
will happily clobber an existing image.
According to https://github.com/cirruslabs/tart/issues/822 this is a desired behavior of tart, however I feel that in the context of packer, where a user runs packer build ...
without necessarily knowing the resulting image name, this is rather sharp edge.
What do you mean by "without necessarily knowing the resulting image name"?
For example, GCP's googlecompute
builder also overrides image if image_name
is not the default packer-{{timestamp}}
one.
I guess this was a surprised behaviour during your first few runs but it's been like that from the creation and some folks use to this behaviour already.
I just mean that by running a packer build I could unknowingly delete a vm with the same name as the vm_name in the packer template. The indirection makes what seems like a safe command (packer build) dangerous.
I worked around this by generating timestamp-based vm names.
It seems that if there is already a vm with the same name as the one specified by
vm_name
, that VM will be overwritten. This seems a little dangerous, and might also have been the cause of https://github.com/cirruslabs/tart/issues/860