2023-07-05 12:47:14 +00:00
|
|
|
data "openstack_compute_flavor_v2" "m1_small" {
|
|
|
|
name = "m1.small"
|
|
|
|
}
|
|
|
|
|
|
|
|
data "openstack_images_image_v2" "bionic-raw" {
|
|
|
|
name = "bionic-raw"
|
|
|
|
most_recent = true
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "openstack_compute_instance_v2" "test_servers" {
|
2023-10-27 17:18:20 +00:00
|
|
|
count = 7
|
2023-07-05 12:47:14 +00:00
|
|
|
name = format("%s_%02d", "test_server", count.index+1)
|
|
|
|
flavor_id = data.openstack_compute_flavor_v2.m1_small.id
|
|
|
|
key_pair = "arif-key"
|
|
|
|
security_groups = ["default"]
|
|
|
|
|
|
|
|
block_device {
|
|
|
|
uuid = data.openstack_images_image_v2.bionic-raw.id
|
|
|
|
source_type = "image"
|
|
|
|
volume_size = 10
|
|
|
|
boot_index = 0
|
|
|
|
destination_type = "volume"
|
|
|
|
delete_on_termination = true
|
|
|
|
}
|
|
|
|
|
|
|
|
network {
|
|
|
|
name = "private"
|
|
|
|
}
|
|
|
|
}
|