Skip to content

Commit

Permalink
try with cluster_name and instance name as prefix for volume_id
Browse files Browse the repository at this point in the history
  • Loading branch information
mboisson committed Jan 13, 2025
1 parent cb02d51 commit 3520d93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openstack/infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ resource "openstack_blockstorage_volume_v3" "volumes" {
resource "openstack_compute_volume_attach_v2" "attachments" {
for_each = module.design.volumes
instance_id = openstack_compute_instance_v2.instances[each.value.instance].id
volume_id = try(each.value.volume_id, openstack_blockstorage_volume_v3.volumes[each.key].id)
volume_id = try("${var.cluster_name}-${each.value.instance}-${each.value.volume_id}", openstack_blockstorage_volume_v3.volumes[each.key].id)
}

locals {
Expand Down

0 comments on commit 3520d93

Please sign in to comment.