Skip to content
Snippets Groups Projects
Commit 8540de7a authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

feat: Update volume attachment to use specific IDs

parent b23aad7a
No related branches found
No related tags found
1 merge request!47Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46)
...@@ -76,13 +76,16 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" { ...@@ -76,13 +76,16 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
instance_id = openstack_compute_instance_v2.ohpc.id instance_id = openstack_compute_instance_v2.ohpc.id
} }
# Attach volumes # Attach specific volumes
resource "openstack_compute_volume_attach_v2" "volume_attach" { resource "openstack_compute_volume_attach_v2" "attach_prod_volume" {
count = length(var.vol_ids)
instance_id = openstack_compute_instance_v2.ohpc.id instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = var.vol_ids[count.index] volume_id = var.prod_volume_id
} }
resource "openstack_compute_volume_attach_v2" "attach_prod_queue_volume" {
instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = var.prod_queue_volume_id
}
output "xdmod_instance_id" { output "xdmod_instance_id" {
value = openstack_compute_instance_v2.ohpc.id value = openstack_compute_instance_v2.ohpc.id
} }
...@@ -93,7 +96,7 @@ output "ssh_host" { ...@@ -93,7 +96,7 @@ output "ssh_host" {
output "device" { output "device" {
value = [ value = [
openstack_compute_volume_attach_v2.volume_attach[0].device, openstack_compute_volume_attach_v2.attach_prod_volume.device,
openstack_compute_volume_attach_v2.volume_attach[1].device, openstack_compute_volume_attach_v2.attach_prod_queue_volume.device
] ]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment