diff --git a/openstack-tf/d4s-production/project-setup/main.tf b/openstack-tf/d4s-production/project-setup/main.tf index 634ba4d..14c6056 100644 --- a/openstack-tf/d4s-production/project-setup/main.tf +++ b/openstack-tf/d4s-production/project-setup/main.tf @@ -1,6 +1,6 @@ # Define required providers terraform { -required_version = ">= 0.14.0" + required_version = ">= 0.14.0" required_providers { openstack = { source = "terraform-provider-openstack/openstack" @@ -9,12 +9,37 @@ required_version = ">= 0.14.0" } } -# SSH settings -module "ssh_settings" { - source = "../../modules/ssh-key-ref" +provider "openstack" { + cloud = "d4s-production" + # cloud = "ISTI-Cloud" } -provider "openstack" { - cloud = "d4s-production" -# cloud = "ISTI-Cloud" +# Main module +module "main_private_net_and_dns_zone" { + source = "../../modules/main_private_net_and_dns_zone" + dns_zone = { + zone_name = "cloud.d4science.org." + email = "postmaster@isti.cnr.it" + description = "DNS primary zone for the d4s-production-cloud project" + ttl = 8600 + } + os_project_data = { + id = "1b45adf388934758b56d0dfdb4bfacf3" + } + main_private_network = { + name = "d4s-production-cloud-main" + description = "D4Science Production private network (use this as the main network)" + } + main_private_subnet = { + name = "d4s-production-cloud-main-subnet" + description = "D4Science Production main private subnet" + cidr = "10.1.40.0/21" + gateway_ip = "10.1.40.1" + allocation_start = "10.1.41.100" + allocation_end = "10.1.47.254" + } + external_router = { + name = "d4s-production-cloud-external-router" + description = "D4Science Production main router" + } } diff --git a/openstack-tf/d4s-production/project-setup/main_network_dns_zone.tf b/openstack-tf/d4s-production/project-setup/main_network_dns_zone.tf deleted file mode 120000 index c3aec67..0000000 --- a/openstack-tf/d4s-production/project-setup/main_network_dns_zone.tf +++ /dev/null @@ -1 +0,0 @@ -../../modules/main_private_net_and_dns_zone/main_network_dns_zone.tf \ No newline at end of file diff --git a/openstack-tf/d4s-production/project-setup/outputs-production.tf b/openstack-tf/d4s-production/project-setup/outputs-production.tf deleted file mode 120000 index 5d70f9b..0000000 --- a/openstack-tf/d4s-production/project-setup/outputs-production.tf +++ /dev/null @@ -1 +0,0 @@ -../variables/outputs-production.tf \ No newline at end of file diff --git a/openstack-tf/d4s-production/project-setup/production.auto.tfvars b/openstack-tf/d4s-production/project-setup/production.auto.tfvars deleted file mode 120000 index 6c5ac3d..0000000 --- a/openstack-tf/d4s-production/project-setup/production.auto.tfvars +++ /dev/null @@ -1 +0,0 @@ -../variables/production.auto.tfvars \ No newline at end of file diff --git a/openstack-tf/d4s-production/project-setup/variables.tf b/openstack-tf/d4s-production/project-setup/variables.tf deleted file mode 120000 index be9f787..0000000 --- a/openstack-tf/d4s-production/project-setup/variables.tf +++ /dev/null @@ -1 +0,0 @@ -../../modules/common_variables/variables.tf \ No newline at end of file diff --git a/openstack-tf/d4s-production/variables/production.auto.tfvars b/openstack-tf/d4s-production/variables/production.auto.tfvars index f28bb97..2415afa 100644 --- a/openstack-tf/d4s-production/variables/production.auto.tfvars +++ b/openstack-tf/d4s-production/variables/production.auto.tfvars @@ -10,17 +10,11 @@ dns_zone = { ttl = 8600 } -dns_zone_id = "74135b34-1a9c-4c01-8cf0-22450a5660c4" - -default_security_group_name = "default_for_all" - main_private_network = { name = "d4s-production-cloud-main" description = "D4Science Production private network (use this as the main network)" } -main_private_network_id = "020df98d-ae72-452a-b376-3b6dc289acac" - main_private_subnet = { name = "d4s-production-cloud-main-subnet" description = "D4Science Production main private subnet" @@ -30,8 +24,6 @@ main_private_subnet = { allocation_end = "10.1.47.254" } -main_private_subnet_id = "5d7b83ad-e058-4a3a-bfd8-d20ba6d42e1a" - external_router = { name = "d4s-production-cloud-external-router" description = "D4Science Production main router" @@ -55,7 +47,6 @@ basic_services_ip = { main_haproxy_l7_ip = ["10.1.40.11", "10.1.40.12"] - octavia_information = { main_lb_name = "d4s-production-cloud-l4-load-balancer" main_lb_description = "Main L4 load balancer for the D4Science production"