我正在尝试使用Terraform向Google Compute实例添加第二个磁盘。这似乎是正确的:
resource "google_compute_disk" "seconddisk" {
name = "seconddisk"
type = "pd-standard"
zone = "us-west1-a"
size = "100"
}
resource "google_compute_instance" "someinstance" {
name = "someinstance"
machine_type = "n1-standard-4"
zone = "us-west1-a"
disk {
image = "${var.image_url}"
}
disk {
disk = "${google_compute_disk.seconddisk.name}"
}
...
}
但是,我收到以下错误:
google_compute_instance.kafka1:创建实例时出错:googleapi:错误409:资源' ...'已经存在,已经存在。
思想?