From 32c0d4630085ac975e892e9a0a0ec7851db7c6ce Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Mon, 4 Dec 2023 12:45:45 +0100 Subject: [PATCH] Passe uri-resolver to module within generic_smartgears_service --- openstack-tf/d4s-dev/geoportal/inputs.tf | 23 ------------- openstack-tf/d4s-dev/geoportal/main.tf | 9 ----- .../generic_smartgears_service.tf | 1 - openstack-tf/d4s-dev/uri-resolver/inputs.tf | 33 ------------------- openstack-tf/d4s-dev/uri-resolver/main.tf | 26 +++++++++++++++ 5 files changed, 26 insertions(+), 66 deletions(-) delete mode 100644 openstack-tf/d4s-dev/geoportal/inputs.tf delete mode 120000 openstack-tf/d4s-dev/uri-resolver/generic_smartgears_service.tf delete mode 100644 openstack-tf/d4s-dev/uri-resolver/inputs.tf diff --git a/openstack-tf/d4s-dev/geoportal/inputs.tf b/openstack-tf/d4s-dev/geoportal/inputs.tf deleted file mode 100644 index 1b1fe04d..00000000 --- a/openstack-tf/d4s-dev/geoportal/inputs.tf +++ /dev/null @@ -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 -# } -# } - -# } diff --git a/openstack-tf/d4s-dev/geoportal/main.tf b/openstack-tf/d4s-dev/geoportal/main.tf index eabcff02..4755adb8 100644 --- a/openstack-tf/d4s-dev/geoportal/main.tf +++ b/openstack-tf/d4s-dev/geoportal/main.tf @@ -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 } } } diff --git a/openstack-tf/d4s-dev/uri-resolver/generic_smartgears_service.tf b/openstack-tf/d4s-dev/uri-resolver/generic_smartgears_service.tf deleted file mode 120000 index b8c2cf18..00000000 --- a/openstack-tf/d4s-dev/uri-resolver/generic_smartgears_service.tf +++ /dev/null @@ -1 +0,0 @@ -../../modules/generic_smartgears_service/generic_smartgears_service.tf \ No newline at end of file diff --git a/openstack-tf/d4s-dev/uri-resolver/inputs.tf b/openstack-tf/d4s-dev/uri-resolver/inputs.tf deleted file mode 100644 index f17202c0..00000000 --- a/openstack-tf/d4s-dev/uri-resolver/inputs.tf +++ /dev/null @@ -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 - } - } - -} diff --git a/openstack-tf/d4s-dev/uri-resolver/main.tf b/openstack-tf/d4s-dev/uri-resolver/main.tf index 3290183d..ac1cd99c 100644 --- a/openstack-tf/d4s-dev/uri-resolver/main.tf +++ b/openstack-tf/d4s-dev/uri-resolver/main.tf @@ -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 + } + } +} + +