diff --git a/aws/infrastructure.tf b/aws/infrastructure.tf index 63f946aa..ec8be29f 100644 --- a/aws/infrastructure.tf +++ b/aws/infrastructure.tf @@ -202,7 +202,10 @@ locals { for pv_key, pv_values in var.volumes: pv_key => { for name, specs in pv_values: - name => ["/dev/disk/by-id/*${replace(aws_ebs_volume.volumes["${x}-${pv_key}-${name}"].id, "-", "")}"] + name => merge( + { glob = "/dev/disk/by-id/*${replace(aws_ebs_volume.volumes["${x}-${pv_key}-${name}"].id, "-", "")}" }, + specs, + ) } if contains(values.tags, pv_key) } : {} } diff --git a/azure/infrastructure.tf b/azure/infrastructure.tf index b0cc87e5..06e39905 100644 --- a/azure/infrastructure.tf +++ b/azure/infrastructure.tf @@ -165,7 +165,10 @@ locals { for pv_key, pv_values in var.volumes: pv_key => { for name, specs in pv_values: - name => ["/dev/disk/azure/scsi1/lun${index(module.design.volume_per_instance[x], replace(pv_key, "${x}-", ""))}"] + name => merge( + { glob = "/dev/disk/azure/scsi1/lun${index(module.design.volume_per_instance[x], replace(pv_key, "${x}-", ""))}" }, + specs, + ) } if contains(values.tags, pv_key) } : {} } diff --git a/gcp/infrastructure.tf b/gcp/infrastructure.tf index fa369009..4aede434 100644 --- a/gcp/infrastructure.tf +++ b/gcp/infrastructure.tf @@ -175,7 +175,10 @@ locals { for pv_key, pv_values in var.volumes: pv_key => { for name, specs in pv_values: - name => ["/dev/disk/by-id/google-${var.cluster_name}-${x}-${pv_key}-${name}"] + name => merge( + { glob = "/dev/disk/by-id/google-${var.cluster_name}-${x}-${pv_key}-${name}"}, + specs, + ) } if contains(values.tags, pv_key) } : {} } diff --git a/openstack/infrastructure.tf b/openstack/infrastructure.tf index 338361e5..40cdc578 100644 --- a/openstack/infrastructure.tf +++ b/openstack/infrastructure.tf @@ -101,6 +101,7 @@ resource "openstack_blockstorage_volume_v3" "volumes" { size = each.value.size volume_type = lookup(each.value, "type", null) snapshot_id = lookup(each.value, "snapshot", null) + enable_online_resize = lookup(each.value, "enable_resize", false) } resource "openstack_compute_volume_attach_v2" "attachments" { @@ -129,7 +130,10 @@ locals { for pv_key, pv_values in var.volumes: pv_key => { for name, specs in pv_values: - name => ["/dev/disk/by-id/*${substr(openstack_blockstorage_volume_v3.volumes["${x}-${pv_key}-${name}"].id, 0, 20)}"] + name => merge( + { glob = "/dev/disk/by-id/*${substr(openstack_blockstorage_volume_v3.volumes["${x}-${pv_key}-${name}"].id, 0, 20)}" }, + specs, + ) } if contains(values.tags, pv_key) } : {} }