further fine tuning

This commit is contained in:
Arif Ali 2023-07-05 15:58:06 +01:00
parent 2eda181ab6
commit e9514b0893
Signed by: arif
GPG Key ID: 369608FBA1353A70
3 changed files with 24 additions and 14 deletions

View File

@ -0,0 +1,23 @@
resource "openstack_images_image_v2" "cirros" {
name = "cirros"
local_file_path = "/home/arif/images/cirros-0.5.1-x86_64-disk.img"
container_format = "bare"
disk_format = "qcow2"
visibility = "public"
}
resource "openstack_images_image_v2" "bionic-raw" {
name = "bionic-raw"
local_file_path = "/home/arif/images/bionic-server-cloudimg-amd64-raw.img"
container_format = "bare"
disk_format = "raw"
visibility = "public"
}
resource "openstack_images_image_v2" "focal-raw" {
name = "focal-raw"
local_file_path = "/home/arif/images/focal-server-cloudimg-amd64-raw.img"
container_format = "bare"
disk_format = "raw"
visibility = "public"
}

View File

@ -40,11 +40,3 @@ resource "openstack_compute_secgroup_v2" "allow_ping" {
cidr = "0.0.0.0/0"
}
}
resource "openstack_images_image_v2" "cirros" {
name = "cirros"
local_file_path = "/home/arif/images/cirros-0.5.1-x86_64-disk.img"
container_format = "bare"
disk_format = "qcow2"
visibility = "public"
}

View File

@ -2,11 +2,6 @@ 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_server_01" {
name = "test_server_01"
flavor_id = data.openstack_compute_flavor_v2.m1_small.id
@ -14,7 +9,7 @@ resource "openstack_compute_instance_v2" "test_server_01" {
security_groups = ["default"]
block_device {
uuid = data.openstack_images_image_v2.bionic-raw.id
uuid = openstack_images_image_v2.bionic-raw.id
source_type = "image"
volume_size = 10
boot_index = 0