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

feat: Attach multiple volumes to OpenHPC instance

parent fa1c1fac
No related branches found
No related tags found
3 merge requests!47Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46),!43feat: Add new data volume for XDMod queue data,!34feat: Add new data volume for XDMod queue data
Pipeline #9083 failed with stages
in 25 seconds
......@@ -26,7 +26,10 @@ variable "floating_ip_ohpc" {type = string}
variable "ohpc_user" {}
variable "ssh_private_key" {}
variable "vol_id" {}
variable "vol_ids" {
type = list(string)
default = []
}
# creates details for the OHPC instance
resource "openstack_compute_instance_v2" "ohpc" {
......@@ -63,8 +66,9 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
# Attach a volume
resource "openstack_compute_volume_attach_v2" "volume_attach" {
count = length(var.vol_ids)
instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = var.vol_id
volume_id = var.vol_ids[count.index]
}
output "xdmod_instance_id" {
......
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