【发布时间】:2019-07-13 16:46:55
【问题描述】:
我正在尝试使用 Terraform 进行第一次 Compute Engine 实例的配置。
需要的参数之一是正在使用的图像名称。通过控制台手动配置实例时,我可以看到图像列表,但这些是图像的人类可读标签(例如“CentOS 6”、“Ubuntu 16.04 LTS”等)我试图了解我会在哪里获取我将在“resource”指令的“boot_disk”部分中使用的实际 Compute Engine 映像名称的列表。
resource "google_compute_instance" "default" {
name = "Test_CE"
machine_type = "n1-standard-1"
zone = "us-east1-b"
boot_disk {
initialize_params {
image = "<actual image name goes here>"
}
}
}
【问题讨论】:
标签: google-cloud-platform google-compute-engine terraform