Passe uri-resolver to module within generic_smartgears_service

This commit is contained in:
Francesco Mangiacrapa 2023-12-04 12:45:45 +01:00
parent 88a15ee099
commit 32c0d46300
5 changed files with 26 additions and 66 deletions

View File

@ -1,23 +0,0 @@
# #The Geoportal Instance
# variable "smartgears_service_instances_map" {
# type = map(object({
# name = string
# description = string
# flavor = string
# networks = list(string)
# security_groups = list(string)
# block_device_uuid = string
# }))
# default = {
# # Geoportal instance
# geoportal_service = {
# name = "geoportal-cms",
# description = "The Geoportal instance",
# flavor = "m1_large",
# networks = ["d4s-dev-cloud-main", "postgresql-srv-net"],
# security_groups = ["default", "http and https from the load balancers"]
# block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
# }
# }
# }

View File

@ -29,15 +29,6 @@ module "smartgears_service_generic" {
networks = ["d4s-dev-cloud-main", "postgresql-srv-net"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
},
# URI-Resolver instance 1
uri_resolver_service_i1 = {
name = "data",
description = "The data instance",
flavor = "m1.medium",
networks = ["d4s-dev-cloud-main"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
}
}
}

View File

@ -1 +0,0 @@
../../modules/generic_smartgears_service/generic_smartgears_service.tf

View File

@ -1,33 +0,0 @@
#The URI-Resolver instances
variable "smartgears_service_instances_map" {
type = map(object({
name = string
description = string
flavor = string
networks = list(string)
security_groups = list(string)
block_device_uuid = string
}))
default = {
# URI-Resolver instance 1
uri_resolver_service_i1 = {
name = "data",
description = "The data instance",
flavor = "m1.medium",
networks = ["d4s-dev-cloud-main"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
},
# URI-Resolver instance 2
uri_resolver_service_i2 = {
name = "data1",
description = "The data1 instance",
flavor = "m1.medium",
networks = ["d4s-dev-cloud-main"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
}
}
}

View File

@ -17,3 +17,29 @@ data "terraform_remote_state" "privnet_dns_router" {
}
}
module "smartgears_service_generic" {
source = "../../modules/generic_smartgears_service"
smartgears_service_instances_map = {
uri_resolver_service_i1 = {
name = "data",
description = "The data instance",
flavor = "m1.medium",
networks = ["d4s-dev-cloud-main"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
},
# URI-Resolver instance 2
uri_resolver_service_i2 = {
name = "data1",
description = "The data1 instance",
flavor = "m1.medium",
networks = ["d4s-dev-cloud-main"],
security_groups = ["default", "http and https from the load balancers"]
block_device_uuid = "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" #ubuntu_18_04.uuid of DEV
}
}
}