feature/26282 #18

Merged
giancarlo.panichi merged 3 commits from feature/26282 into main 2024-01-17 15:38:03 +01:00
2 changed files with 1381 additions and 486 deletions

View File

@ -23,10 +23,10 @@ module "common_variables" {
source = "../../modules/common_variables"
}
module "instance_with_data_volume" {
source = "../../modules/instance_with_data_volume"
module "instance_without_data_volume" {
source = "../../modules/instance_without_data_volume"
instances_with_data_volume_map = {
instances_without_data_volume_map = {
dm_pool_manager_proto = {
name = "dm-pool-manager-proto",
description = "This instance is a DataMiner Pool Manager service",
@ -35,11 +35,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dm_pool_manager_proto_data_volume",
size = "30",
device = "/dev/vdb"
}
image_volume_size = 30
},
dataminer_proto_ghost = {
name = "dataminer-proto-ghost",
@ -49,11 +45,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_proto_ghost_data_volume",
size = "50",
device = "/dev/vdb"
}
image_volume_size = 50
},
dataminer_1_proto_1804 = {
name = "dataminer1-proto-1804",
@ -64,11 +56,6 @@ module "instance_with_data_volume" {
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
image_volume_size = 80
volume = {
name = "dataminer_1_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
},
dataminer_2_proto_1804 = {
name = "dataminer2-proto-1804",
@ -78,11 +65,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_2_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_3_proto_1804 = {
name = "dataminer3-proto-1804",
@ -92,11 +75,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_3_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_4_proto_1804 = {
name = "dataminer4-proto-1804",
@ -106,11 +85,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_4_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_5_proto_1804 = {
name = "dataminer5-proto-1804",
@ -120,11 +95,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_5_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_6_proto_1804 = {
name = "dataminer6-proto-1804",
@ -134,11 +105,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_6_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_7_proto_1804 = {
name = "dataminer7-proto-1804",
@ -148,11 +115,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_7_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_8_proto_1804 = {
name = "dataminer8-proto-1804",
@ -162,11 +125,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_8_proto_1804_data_volume",
size = "80",
device = "/dev/vdb"
}
image_volume_size = 80
},
dataminer_2_gw_proto_1804 = {
name = "dataminer2-gw-proto-1804",
@ -176,11 +135,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_2_gw_proto_1804_data_volume",
size = "40",
device = "/dev/vdb"
}
image_volume_size = 40
},
dataminer_3_gw_proto_1804 = {
name = "dataminer3-gw-proto-1804",
@ -190,11 +145,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_3_gw_proto_1804_data_volume",
size = "40",
device = "/dev/vdb"
}
image_volume_size = 40
},
dataminer_4_gw_proto_1804 = {
name = "dataminer4-gw-proto-1804",
@ -204,11 +155,7 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_4_gw_proto_1804_data_volume",
size = "40",
device = "/dev/vdb"
}
image_volume_size = 40
},
dataminer_5_gw_proto_1804 = {
name = "dataminer5-gw-proto-1804",
@ -218,11 +165,133 @@ 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],
server_groups_ids = [],
image_ref = module.common_variables.ubuntu_1804
volume = {
name = "dataminer_5_gw_proto_1804_data_volume",
size = "40",
device = "/dev/vdb"
}
image_volume_size = 40
}
}
}
locals {
cname_target = "main-lb.${data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name}"
}
#
# Add DNS record/s
#
module "dns_records_create" {
source = "../../modules/dns_resources"
dns_resources_map = {
dm-pool-manager-proto = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dm-pool-manager-proto", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DM Pool Manager Proto"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer-proto-ghost = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer-proto-ghost", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner Proto Ghost"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer1-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer1-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 1 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer2-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer2-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 2 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer3-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer3-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 3 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer4-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer4-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 4 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer5-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer5-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 5 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer6-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer6-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 6 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer7-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer7-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 7 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer8-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer8-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 8 Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer2-gw-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer2-gw-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 2 Generic Worker Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer3-gw-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer3-gw-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 3 Generic Worker Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer4-gw-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer4-gw-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 4 Generic Worker Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
dataminer5-gw-proto-1804 = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["dataminer5-gw-proto-1804", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "DataMiner 5 Generic Worker Proto 1804"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
}
}
}

File diff suppressed because it is too large Load Diff