Hi,
I have a gcloud instance snapshot (you can view it in the annexed file (ls-snapshot.png)
I want to import it and use it in a google_compute_instance like the code below,
resource "google_compute_instance" "servers" {
count = var.count_server
name = "server-${count.index + 1}"
machine_type = "-------"
zone = "--------"
allow_stopping_for_update = "true"
tags = [ "server", "private-access" ]
labels = {
"name" = "server-${count.index + 1}"
"type" = "server"
}
boot_disk {
initialize_params {
image = var.ubuntu_2004_sku
}
}
network_interface {
network = var.vpc_name
subnetwork = var.vpc_subnet_private_name
network_ip = "0.0.0.${count.index + 2}"
}
service_account {
scopes = ["userinfo-email", "compute-ro", "storage-ro", "cloud-platform"]
email = "terraform-sa@---------.iam.gserviceaccount.com"
}
}
How can I make that happen?