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
I have a VM that I created with the terraform provider. However, I no longer have the state file for this VM. I would now like to import it into my existing state file (which contains many other VMs) using terraform import.
Unfortunately, terraform does not want to import the existing VM as a state, but create a new one, as the VM is to be created from a clone with cloud-init. However, the VM has already been created with exactly the clone image with which it is now to be imported.
How can I tell the provider that this VM does not need to be replaced as it is already a clone of the “ubuntu2204-ci” image?
@Tinyblargon Thank you, that would have been my workaround too, but I figured there must be a better way that I don't know.
I'll try it out over the next few days and share my findings here.
I have a VM that I created with the terraform provider. However, I no longer have the state file for this VM. I would now like to import it into my existing state file (which contains many other VMs) using terraform import.
Unfortunately, terraform does not want to import the existing VM as a state, but create a new one, as the VM is to be created from a clone with cloud-init. However, the VM has already been created with exactly the clone image with which it is now to be imported.
How can I tell the provider that this VM does not need to be replaced as it is already a clone of the “ubuntu2204-ci” image?
terraform code snippet
main.tf
module/module.tf
The text was updated successfully, but these errors were encountered: