Added (optional) parameter to set the volume size of the VM. Default value is 10 (GB)
This commit is contained in:
parent
1f0274453f
commit
21a81ad956
|
@ -36,9 +36,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dm_pool_manager_proto_data_volume",
|
name = "dm_pool_manager_proto_data_volume",
|
||||||
size = "30",
|
size = "30",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_proto_ghost = {
|
dataminer_proto_ghost = {
|
||||||
|
@ -50,9 +50,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_proto_ghost_data_volume",
|
name = "dataminer_proto_ghost_data_volume",
|
||||||
size = "50",
|
size = "50",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_1_proto_1804 = {
|
dataminer_1_proto_1804 = {
|
||||||
|
@ -63,10 +63,11 @@ module "instance_with_data_volume" {
|
||||||
security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers],
|
security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers],
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
|
image_volume_size = 80
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_1_proto_1804_data_volume",
|
name = "dataminer_1_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_2_proto_1804 = {
|
dataminer_2_proto_1804 = {
|
||||||
|
@ -78,9 +79,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_2_proto_1804_data_volume",
|
name = "dataminer_2_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_3_proto_1804 = {
|
dataminer_3_proto_1804 = {
|
||||||
|
@ -92,9 +93,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_3_proto_1804_data_volume",
|
name = "dataminer_3_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_4_proto_1804 = {
|
dataminer_4_proto_1804 = {
|
||||||
|
@ -106,9 +107,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_4_proto_1804_data_volume",
|
name = "dataminer_4_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_5_proto_1804 = {
|
dataminer_5_proto_1804 = {
|
||||||
|
@ -120,9 +121,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_5_proto_1804_data_volume",
|
name = "dataminer_5_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_6_proto_1804 = {
|
dataminer_6_proto_1804 = {
|
||||||
|
@ -134,9 +135,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_6_proto_1804_data_volume",
|
name = "dataminer_6_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_7_proto_1804 = {
|
dataminer_7_proto_1804 = {
|
||||||
|
@ -148,9 +149,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_7_proto_1804_data_volume",
|
name = "dataminer_7_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_8_proto_1804 = {
|
dataminer_8_proto_1804 = {
|
||||||
|
@ -162,9 +163,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_8_proto_1804_data_volume",
|
name = "dataminer_8_proto_1804_data_volume",
|
||||||
size = "80",
|
size = "80",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_2_gw_proto_1804 = {
|
dataminer_2_gw_proto_1804 = {
|
||||||
|
@ -176,9 +177,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_2_gw_proto_1804_data_volume",
|
name = "dataminer_2_gw_proto_1804_data_volume",
|
||||||
size = "40",
|
size = "40",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_3_gw_proto_1804 = {
|
dataminer_3_gw_proto_1804 = {
|
||||||
|
@ -190,9 +191,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_3_gw_proto_1804_data_volume",
|
name = "dataminer_3_gw_proto_1804_data_volume",
|
||||||
size = "40",
|
size = "40",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_4_gw_proto_1804 = {
|
dataminer_4_gw_proto_1804 = {
|
||||||
|
@ -204,9 +205,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_4_gw_proto_1804_data_volume",
|
name = "dataminer_4_gw_proto_1804_data_volume",
|
||||||
size = "40",
|
size = "40",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataminer_5_gw_proto_1804 = {
|
dataminer_5_gw_proto_1804 = {
|
||||||
|
@ -218,9 +219,9 @@ module "instance_with_data_volume" {
|
||||||
server_groups_ids = [],
|
server_groups_ids = [],
|
||||||
image_ref = module.common_variables.ubuntu_1804
|
image_ref = module.common_variables.ubuntu_1804
|
||||||
volume = {
|
volume = {
|
||||||
name = "dataminer_5_gw_proto_1804_data_volume",
|
name = "dataminer_5_gw_proto_1804_data_volume",
|
||||||
size = "40",
|
size = "40",
|
||||||
device = "/dev/vdb"
|
device = "/dev/vdb"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ resource "openstack_compute_instance_v2" "instance_with_data_volume" {
|
||||||
block_device {
|
block_device {
|
||||||
uuid = each.value.image_ref.uuid
|
uuid = each.value.image_ref.uuid
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = 10
|
volume_size = each.value.image_volume_size
|
||||||
boot_index = 0
|
boot_index = 0
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
delete_on_termination = false
|
delete_on_termination = false
|
||||||
|
|
|
@ -9,6 +9,7 @@ variable "instances_with_data_volume_map" {
|
||||||
security_groups = list(string)
|
security_groups = list(string)
|
||||||
server_groups_ids = list(string)
|
server_groups_ids = list(string)
|
||||||
image_ref = map(string)
|
image_ref = map(string)
|
||||||
|
image_volume_size = optional(number, 10)
|
||||||
volume = map(string)
|
volume = map(string)
|
||||||
}))
|
}))
|
||||||
default = {
|
default = {
|
||||||
|
|
|
@ -20,7 +20,7 @@ resource "openstack_compute_instance_v2" "smartgears_service" {
|
||||||
block_device {
|
block_device {
|
||||||
uuid = each.value.image_ref.uuid
|
uuid = each.value.image_ref.uuid
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = 10
|
volume_size = each.value.image_volume_size
|
||||||
boot_index = 0
|
boot_index = 0
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
delete_on_termination = false
|
delete_on_termination = false
|
||||||
|
|
|
@ -9,6 +9,7 @@ variable "instances_without_data_volume_map" {
|
||||||
security_groups = list(string)
|
security_groups = list(string)
|
||||||
server_groups_ids = list(string)
|
server_groups_ids = list(string)
|
||||||
image_ref = map(string)
|
image_ref = map(string)
|
||||||
|
image_volume_size = optional(number, 10)
|
||||||
}))
|
}))
|
||||||
default = {
|
default = {
|
||||||
smartgears_service = {
|
smartgears_service = {
|
||||||
|
|
Loading…
Reference in New Issue