From 557e644b292397fa0bc5a803324f5d5f275beb5f Mon Sep 17 00:00:00 2001 From: Magnus Andersson Date: Fri, 12 Jan 2024 19:31:54 +0100 Subject: [PATCH] Try to make the ordering of block devices deterministic. --- kube.tf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/kube.tf b/kube.tf index 156fd50..c4a9d43 100644 --- a/kube.tf +++ b/kube.tf @@ -53,12 +53,11 @@ resource "openstack_compute_instance_v2" "kube" { destination_type = "volume" boot_index = 0 } - - block_device { - uuid = resource.openstack_blockstorage_volume_v3.kubevolumesnap[count.index].id - source_type = "volume" - destination_type = "volume" - boot_index = -1 - } } +resource "openstack_compute_volume_attach_v2" "snapvolattach" { + instance_id = openstack_compute_instance_v2.kube[count.index].id + volume_id = openstack_blockstorage_volume_v3.kubevolumesnap[count.index].id + count = var.kubesize + depends_on = ["resource.openstack_compute_instance_v2.kube[count.index]"] +}