google-cloud: Set disk.device_name to match API default
* Terraform provider "google" plugin releases leave the disk device_name as "" by default. Recently the API has started to set a default name "persistent-disk-0". Plan and apply show all instance groups need to be recreated to "fix" the name * Impact: Controller and worker instance groups are deleted and recreated, deleting data on controllers and bringing down clusters * Fix: Explicitly set the disk_name to persistent-disk-0 so that terraform finds no diff needs to be applied. * https://github.com/poseidon/typhoon/issues/34 * https://github.com/terraform-providers/terraform-provider-google/issues/574
This commit is contained in:
parent
a5290dac32
commit
a97df839ea
|
@ -55,6 +55,9 @@ resource "google_compute_instance_template" "controller" {
|
||||||
boot = true
|
boot = true
|
||||||
source_image = "${var.os_image}"
|
source_image = "${var.os_image}"
|
||||||
disk_size_gb = "${var.disk_size}"
|
disk_size_gb = "${var.disk_size}"
|
||||||
|
// Set explicit name to match the new default name set by the API.
|
||||||
|
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||||
|
device_name = "persistent-disk-0"
|
||||||
}
|
}
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
|
|
|
@ -55,6 +55,9 @@ resource "google_compute_instance_template" "worker" {
|
||||||
boot = true
|
boot = true
|
||||||
source_image = "${var.os_image}"
|
source_image = "${var.os_image}"
|
||||||
disk_size_gb = "${var.disk_size}"
|
disk_size_gb = "${var.disk_size}"
|
||||||
|
// Set explicit name to match the new default name set by the API.
|
||||||
|
// https://github.com/terraform-providers/terraform-provider-google/issues/574
|
||||||
|
device_name = "persistent-disk-0"
|
||||||
}
|
}
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
|
|
Loading…
Reference in New Issue