Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create the new VM with snapshot ID #12501

Open
A-THS5826-temp opened this issue Sep 8, 2022 · 2 comments
Open

create the new VM with snapshot ID #12501

A-THS5826-temp opened this issue Sep 8, 2022 · 2 comments
Labels

Comments

@A-THS5826-temp
Copy link

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" }
}

@ljluestc
Copy link

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
  # ...
}

@Sankalp951
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants