openstack-infrastructure-te.../s2i2s/main_net_dns_router/main.tf

75 lines
1.9 KiB
HCL

# Define required providers
terraform {
required_version = ">= 0.14.0"
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = ">= 2.0.0"
}
}
}
provider "openstack" {
cloud = "ISTI-Cloud"
}
module "labs_common_variables" {
source = "../../modules/labs_common_variables"
}
module "project_variables" {
source = "../variables"
}
# Main module
module "main_private_net_and_dns_zone" {
source = "../../modules/labs_private_net_and_dns_zone"
dns_zone = {
zone_name = "s2i2s.cloud.isti.cnr.it."
email = "postmaster@isti.cnr.it"
description = "DNS primary zone for the S2I2S project"
ttl = 8600
}
os_project_data = {
name = "s2i2s-proj"
id = "d58ff441b31d4d0daf4a3e64d5332082"
}
main_private_network = {
name = "s2i2s-proj-main"
description = "S2I2S private network (use this as the main network)"
}
main_private_subnet = {
name = "s2i2s-proj-main-subnet"
description = "S2I2S main private subnet"
cidr = "10.10.0.0/21"
gateway_ip = "10.10.0.1"
allocation_start = "10.10.1.1"
allocation_end = "10.10.7.254"
}
external_router = {
name = "s2i2s-proj-external-router"
description = "S2I2S main router"
}
default_firewall_rules_map = {
"ssh_from_the_jump_proxy" = {
description = "SSH from the S2I2S VPN 1"
source = module.project_variables.basic_services_ip.ssh_jump_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
}
}
}