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

test- replaced count in output section of code with a for loop

parent 1ce40eac
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" { ...@@ -64,7 +64,7 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
instance_id = openstack_compute_instance_v2.ohpc.id instance_id = openstack_compute_instance_v2.ohpc.id
} }
# Attach a volume # Attach volumes
resource "openstack_compute_volume_attach_v2" "volume_attach" { resource "openstack_compute_volume_attach_v2" "volume_attach" {
count = length(var.vol_ids) count = length(var.vol_ids)
instance_id = openstack_compute_instance_v2.ohpc.id instance_id = openstack_compute_instance_v2.ohpc.id
...@@ -72,7 +72,7 @@ resource "openstack_compute_volume_attach_v2" "volume_attach" { ...@@ -72,7 +72,7 @@ resource "openstack_compute_volume_attach_v2" "volume_attach" {
} }
output "xdmod_instance_id" { output "xdmod_instance_id" {
value = openstack_compute_instance_v2.ohpc[count.index].id value = [for instance in openstack_compute_instance_v2.ohpc : instance.id]
} }
output "ssh_host" { output "ssh_host" {
...@@ -80,5 +80,5 @@ output "ssh_host" { ...@@ -80,5 +80,5 @@ output "ssh_host" {
} }
output "device" { output "device" {
value = openstack_compute_volume_attach_v2.volume_attach[count.index].device value = [for volume in openstack_compute_volume_attach_v2.volume_attach : 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