Compare commits
No commits in common. "89c6f3853e990a96d5de690fb1c7d1bd489ec31c" and "278f0b514f260ca8169ea03940e172a6a6f21664" have entirely different histories.
89c6f3853e
...
278f0b514f
|
|
@ -129,21 +129,3 @@ main_net_dns_router_data:
|
|||
net_name: hiis-lab-cloud-main
|
||||
subnet_offset: 5
|
||||
subnet_mask: 22
|
||||
- name: d-net
|
||||
cloud_credentials: "ISTI-Cloud"
|
||||
dns_zone_name: d-net
|
||||
os_project_name: "d-net-proj"
|
||||
os_project_id: "484094ba7c444dd286f63df659c08e16"
|
||||
dns_zone_suffix: "{{ default_dns_zone_suffix }}"
|
||||
lab_name: D-Net
|
||||
net_name: d-net-cloud-main
|
||||
subnet_offset: 24
|
||||
- name: servizi
|
||||
cloud_credentials: "ISTI-Cloud"
|
||||
dns_zone_name: servizi
|
||||
os_project_name: "servizi-proj"
|
||||
os_project_id: "71d54644c6a7487696c333255f102822"
|
||||
dns_zone_suffix: "{{ default_dns_zone_suffix }}"
|
||||
lab_name: Servizi
|
||||
net_name: servizi-cloud-main
|
||||
subnet_offset: 25
|
||||
|
|
|
|||
|
|
@ -1,186 +0,0 @@
|
|||
# Define required providers
|
||||
terraform {
|
||||
required_version = ">= 0.14.0"
|
||||
required_providers {
|
||||
openstack = {
|
||||
source = "terraform-provider-openstack/openstack"
|
||||
# version = "~> 1.53.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "openstack" {
|
||||
cloud = "ISTI-Cloud"
|
||||
}
|
||||
|
||||
module "labs_common_variables" {
|
||||
source = "../../modules/labs_common_variables"
|
||||
}
|
||||
# Main module
|
||||
module "main_private_net_and_dns_zone" {
|
||||
source = "../../modules/labs_private_net_and_dns_zone"
|
||||
dns_zone = {
|
||||
zone_name = "d-net.cloud.isti.cnr.it."
|
||||
email = "postmaster@isti.cnr.it"
|
||||
description = "DNS primary zone for the D-Net project"
|
||||
ttl = 8600
|
||||
}
|
||||
os_project_data = {
|
||||
name = "d-net-proj"
|
||||
id = "484094ba7c444dd286f63df659c08e16"
|
||||
}
|
||||
|
||||
main_private_network = {
|
||||
name = "d-net-cloud-main"
|
||||
description = "D-Net private network (use this as the main network)"
|
||||
}
|
||||
main_private_subnet = {
|
||||
name = "d-net-cloud-main-subnet"
|
||||
description = "D-Net main private subnet"
|
||||
cidr = "10.24.0.0/21"
|
||||
gateway_ip = "10.24.0.1"
|
||||
allocation_start = "10.24.1.1"
|
||||
allocation_end = "10.24.7.254"
|
||||
}
|
||||
external_router = {
|
||||
name = "d-net-proj-external-router"
|
||||
description = "D-Net main router"
|
||||
}
|
||||
default_firewall_rules_map = {
|
||||
"ssh_from_isti_net" = {
|
||||
description = "SSH from the ISTI network"
|
||||
source = module.labs_common_variables.ssh_sources.isti_net_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"ssh_from_s2i2s_vpn_1" = {
|
||||
description = "SSH from the S2I2S VPN 1"
|
||||
source = module.labs_common_variables.ssh_sources.s2i2s_vpn_1_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"ssh_from_s2i2s_vpn_2" = {
|
||||
description = "SSH from the S2I2S VPN 2"
|
||||
source = module.labs_common_variables.ssh_sources.s2i2s_vpn_2_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"http_from_everywhere" = {
|
||||
description = "HTTP from everywhere"
|
||||
source = "0.0.0.0/0"
|
||||
port_min = 80
|
||||
port_max = 80
|
||||
},
|
||||
"https_from_everywhere" = {
|
||||
description = "HTTPS from everywhere"
|
||||
source = "0.0.0.0/0"
|
||||
port_min = 443
|
||||
port_max = 443
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output "os_project_data" {
|
||||
value = module.main_private_net_and_dns_zone.os_project_data
|
||||
}
|
||||
|
||||
output "dns_zone" {
|
||||
value = module.main_private_net_and_dns_zone.dns_zone
|
||||
}
|
||||
|
||||
output "dns_zone_id" {
|
||||
value = module.main_private_net_and_dns_zone.dns_zone_id
|
||||
}
|
||||
|
||||
output "main_private_network" {
|
||||
value = module.main_private_net_and_dns_zone.main_private_network
|
||||
}
|
||||
|
||||
output "main_private_network_id" {
|
||||
value = module.main_private_net_and_dns_zone.main_private_network_id
|
||||
}
|
||||
|
||||
output "main_subnet_network" {
|
||||
value = module.main_private_net_and_dns_zone.main_subnet_network
|
||||
}
|
||||
output "main_subnet_network_id" {
|
||||
value = module.main_private_net_and_dns_zone.main_subnet_network_id
|
||||
}
|
||||
|
||||
output "external_gateway_ip" {
|
||||
value = module.main_private_net_and_dns_zone.external_gateway_ip
|
||||
}
|
||||
|
||||
output "main_region" {
|
||||
value = module.labs_common_variables.main_region
|
||||
}
|
||||
|
||||
output "external_network" {
|
||||
value = module.labs_common_variables.external_network
|
||||
}
|
||||
|
||||
output "external_network_id" {
|
||||
value = module.labs_common_variables.external_network.id
|
||||
}
|
||||
|
||||
output "floating_ip_pools" {
|
||||
value = module.labs_common_variables.floating_ip_pools
|
||||
|
||||
}
|
||||
|
||||
output "resolvers_ip" {
|
||||
value = module.labs_common_variables.resolvers_ip
|
||||
}
|
||||
|
||||
output "mtu_size" {
|
||||
value = module.labs_common_variables.mtu_size
|
||||
}
|
||||
|
||||
output "availability_zones_names" {
|
||||
value = module.labs_common_variables.availability_zones_names
|
||||
}
|
||||
|
||||
output "availability_zone_no_gpu_name" {
|
||||
value = module.labs_common_variables.availability_zones_names.availability_zone_no_gpu
|
||||
}
|
||||
|
||||
output "availability_zone_with_gpu_name" {
|
||||
value = module.labs_common_variables.availability_zones_names.availability_zone_with_gpu
|
||||
}
|
||||
|
||||
output "ssh_sources" {
|
||||
value = module.labs_common_variables.ssh_sources
|
||||
}
|
||||
|
||||
output "ubuntu_2204" {
|
||||
value = module.labs_common_variables.ubuntu_2204
|
||||
}
|
||||
|
||||
output "centos_7" {
|
||||
value = module.labs_common_variables.centos_7
|
||||
}
|
||||
|
||||
output "almalinux_9" {
|
||||
value = module.labs_common_variables.almalinux_9
|
||||
}
|
||||
|
||||
output "ubuntu2204_data_file" {
|
||||
value = module.labs_common_variables.ubuntu2204_data_file
|
||||
}
|
||||
|
||||
output "el7_data_file" {
|
||||
value = module.labs_common_variables.el7_data_file
|
||||
}
|
||||
|
||||
output "policy_list" {
|
||||
value = module.labs_common_variables.policy_list
|
||||
}
|
||||
|
||||
output "flavor_list" {
|
||||
value = module.labs_common_variables.flavor_list
|
||||
}
|
||||
|
||||
output "default_security_group_name" {
|
||||
value = module.labs_common_variables.default_security_group_name
|
||||
}
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
# Define required providers
|
||||
terraform {
|
||||
required_version = ">= 0.14.0"
|
||||
required_providers {
|
||||
openstack = {
|
||||
source = "terraform-provider-openstack/openstack"
|
||||
# version = "~> 1.53.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "openstack" {
|
||||
cloud = "ISTI-Cloud"
|
||||
}
|
||||
|
||||
module "labs_common_variables" {
|
||||
source = "../../modules/labs_common_variables"
|
||||
}
|
||||
# Main module
|
||||
module "main_private_net_and_dns_zone" {
|
||||
source = "../../modules/labs_private_net_and_dns_zone"
|
||||
dns_zone = {
|
||||
zone_name = "servizi.cloud.isti.cnr.it."
|
||||
email = "postmaster@isti.cnr.it"
|
||||
description = "DNS primary zone for the Servizi project"
|
||||
ttl = 8600
|
||||
}
|
||||
os_project_data = {
|
||||
name = "servizi-proj"
|
||||
id = "71d54644c6a7487696c333255f102822"
|
||||
}
|
||||
|
||||
main_private_network = {
|
||||
name = "servizi-cloud-main"
|
||||
description = "Servizi private network (use this as the main network)"
|
||||
}
|
||||
main_private_subnet = {
|
||||
name = "servizi-cloud-main-subnet"
|
||||
description = "Servizi main private subnet"
|
||||
cidr = "10.25.0.0/21"
|
||||
gateway_ip = "10.25.0.1"
|
||||
allocation_start = "10.25.1.1"
|
||||
allocation_end = "10.25.7.254"
|
||||
}
|
||||
external_router = {
|
||||
name = "servizi-proj-external-router"
|
||||
description = "Servizi main router"
|
||||
}
|
||||
default_firewall_rules_map = {
|
||||
"ssh_from_isti_net" = {
|
||||
description = "SSH from the ISTI network"
|
||||
source = module.labs_common_variables.ssh_sources.isti_net_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"ssh_from_s2i2s_vpn_1" = {
|
||||
description = "SSH from the S2I2S VPN 1"
|
||||
source = module.labs_common_variables.ssh_sources.s2i2s_vpn_1_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"ssh_from_s2i2s_vpn_2" = {
|
||||
description = "SSH from the S2I2S VPN 2"
|
||||
source = module.labs_common_variables.ssh_sources.s2i2s_vpn_2_cidr
|
||||
port_min = 22
|
||||
port_max = 22
|
||||
},
|
||||
"http_from_everywhere" = {
|
||||
description = "HTTP from everywhere"
|
||||
source = "0.0.0.0/0"
|
||||
port_min = 80
|
||||
port_max = 80
|
||||
},
|
||||
"https_from_everywhere" = {
|
||||
description = "HTTPS from everywhere"
|
||||
source = "0.0.0.0/0"
|
||||
port_min = 443
|
||||
port_max = 443
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
output "os_project_data" {
|
||||
value = module.main_private_net_and_dns_zone.os_project_data
|
||||
}
|
||||
|
||||
output "dns_zone" {
|
||||
value = module.main_private_net_and_dns_zone.dns_zone
|
||||
}
|
||||
|
||||
output "dns_zone_id" {
|
||||
value = module.main_private_net_and_dns_zone.dns_zone_id
|
||||
}
|
||||
|
||||
output "main_private_network" {
|
||||
value = module.main_private_net_and_dns_zone.main_private_network
|
||||
}
|
||||
|
||||
output "main_private_network_id" {
|
||||
value = module.main_private_net_and_dns_zone.main_private_network_id
|
||||
}
|
||||
|
||||
output "main_subnet_network" {
|
||||
value = module.main_private_net_and_dns_zone.main_subnet_network
|
||||
}
|
||||
output "main_subnet_network_id" {
|
||||
value = module.main_private_net_and_dns_zone.main_subnet_network_id
|
||||
}
|
||||
|
||||
output "external_gateway_ip" {
|
||||
value = module.main_private_net_and_dns_zone.external_gateway_ip
|
||||
}
|
||||
|
||||
output "main_region" {
|
||||
value = module.labs_common_variables.main_region
|
||||
}
|
||||
|
||||
output "external_network" {
|
||||
value = module.labs_common_variables.external_network
|
||||
}
|
||||
|
||||
output "external_network_id" {
|
||||
value = module.labs_common_variables.external_network.id
|
||||
}
|
||||
|
||||
output "floating_ip_pools" {
|
||||
value = module.labs_common_variables.floating_ip_pools
|
||||
|
||||
}
|
||||
|
||||
output "resolvers_ip" {
|
||||
value = module.labs_common_variables.resolvers_ip
|
||||
}
|
||||
|
||||
output "mtu_size" {
|
||||
value = module.labs_common_variables.mtu_size
|
||||
}
|
||||
|
||||
output "availability_zones_names" {
|
||||
value = module.labs_common_variables.availability_zones_names
|
||||
}
|
||||
|
||||
output "availability_zone_no_gpu_name" {
|
||||
value = module.labs_common_variables.availability_zones_names.availability_zone_no_gpu
|
||||
}
|
||||
|
||||
output "availability_zone_with_gpu_name" {
|
||||
value = module.labs_common_variables.availability_zones_names.availability_zone_with_gpu
|
||||
}
|
||||
|
||||
output "ssh_sources" {
|
||||
value = module.labs_common_variables.ssh_sources
|
||||
}
|
||||
|
||||
output "ubuntu_2204" {
|
||||
value = module.labs_common_variables.ubuntu_2204
|
||||
}
|
||||
|
||||
output "centos_7" {
|
||||
value = module.labs_common_variables.centos_7
|
||||
}
|
||||
|
||||
output "almalinux_9" {
|
||||
value = module.labs_common_variables.almalinux_9
|
||||
}
|
||||
|
||||
output "ubuntu2204_data_file" {
|
||||
value = module.labs_common_variables.ubuntu2204_data_file
|
||||
}
|
||||
|
||||
output "el7_data_file" {
|
||||
value = module.labs_common_variables.el7_data_file
|
||||
}
|
||||
|
||||
output "policy_list" {
|
||||
value = module.labs_common_variables.policy_list
|
||||
}
|
||||
|
||||
output "flavor_list" {
|
||||
value = module.labs_common_variables.flavor_list
|
||||
}
|
||||
|
||||
output "default_security_group_name" {
|
||||
value = module.labs_common_variables.default_security_group_name
|
||||
}
|
||||
Loading…
Reference in New Issue