Skip to content
Snippets Groups Projects

feat: Add new data volume for XDMod queue data

Closed Krish Moodbidri requested to merge feat-test-xdmod-queue-vol into master
Compare and
4 files
+ 36
7
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 7
3
@@ -26,7 +26,10 @@ variable "floating_ip_ohpc" {type = string}
@@ -26,7 +26,10 @@ variable "floating_ip_ohpc" {type = string}
variable "ohpc_user" {}
variable "ohpc_user" {}
variable "ssh_private_key" {}
variable "ssh_private_key" {}
variable "vol_id" {}
variable "vol_ids" {
 
type = list(string)
 
default = []
 
}
# creates details for the OHPC instance
# creates details for the OHPC instance
resource "openstack_compute_instance_v2" "ohpc" {
resource "openstack_compute_instance_v2" "ohpc" {
@@ -63,8 +66,9 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
@@ -63,8 +66,9 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
# Attach a volume
# Attach a volume
resource "openstack_compute_volume_attach_v2" "volume_attach" {
resource "openstack_compute_volume_attach_v2" "volume_attach" {
 
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_id
volume_id = var.vol_ids[count.index]
}
}
output "xdmod_instance_id" {
output "xdmod_instance_id" {
@@ -76,5 +80,5 @@ output "ssh_host" {
@@ -76,5 +80,5 @@ output "ssh_host" {
}
}
output "device" {
output "device" {
value = openstack_compute_volume_attach_v2.volume_attach.device
value = openstack_compute_volume_attach_v2.volume_attach[count.index].device
}
}
Loading