I need to create an instance with a volume attached.
The problem is that Terraform doesn't export the volume ID when created to a var I can use (but I can see in debug mode that it receives the volume_ID when created).
resource "openstack_networking_floatingip_v2" "floatip_3" {
region = "${var.region}"
pool = "${var.floating_ip_pool}"
}
resource "openstack_blockstorage_volume_v1" "volume_3" {
region = "${var.region}"
name = "tf-cassandra-vol-3"
description = "Volume for Cassandra3"
size = 40
}
resource "openstack_compute_instance_v2" "cassandra-terraform-3" {
name = "cassandra-terraform-3"
image_name = "Ubuntu 14.04"
region = "${var.region}"
flavor_name = "m1.small"
floating_ip = "${openstack_networking_floatingip_v2.floatip_3.address}"
network {
uuid = "XXXXXXXXX"
}
volume {
}
metadata {
this = "that"
}
key_pair = "${var.openstack_key_pair}"
security_groups = ["XX"]
}