Open A-THS5826-temp opened 2 years ago
resource "google_compute_instance" "vm_instance" {
name = "terraform-instance"
machine_type = "e2-micro"
boot_disk {
initialize_params {
image = "debian-cloud/debian-11"
snapshot = "YOUR_SNAPSHOT_NAME" # Replace with the name of your snapshot
}
}
# Other configuration options for your VM instance
# ...
}
Hi @A-THS5826-temp - Can you please provide more details on error you are getting or more information related to issue along with detaills you are entering to create new VM ? so that can check and help you accordingly.
Thank you. Sankalp
I wanted to create VM with exiting snapshot IT. where the code in terraform not available. i tried this below resource "google_compute_instance" "vm_instance" { name = "terraform-instance" machine_type = "e2-micro"
boot_disk { initialize_params { sk { disk = "demo-sanpshot" auto_d image = "debian-cloud/debian-11" } } dielete = true }
but no luck
even this also not working disks = { red = { from_snapshot = "REPLACE_ME_WITH_SNAPSHOT_NAME" } }