further fine tuning
This commit is contained in:
parent
2eda181ab6
commit
e9514b0893
23
openstack/init/01-images.tf
Normal file
23
openstack/init/01-images.tf
Normal 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"
|
||||
}
|
@ -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"
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user