Aggiornati i nomi delle variabili per separare labs e s2i2s.

This commit is contained in:
Andrea Dell'Amico 2024-01-21 11:57:26 +01:00
parent 8f102a9d9e
commit 54038932c0
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
4 changed files with 11 additions and 10 deletions

View File

@ -87,3 +87,4 @@ output "flavor_list" {
output "default_security_group_name" {
value = var.default_security_group_name
}

View File

@ -13,10 +13,10 @@ resource "openstack_networking_network_v2" "main-private-network" {
external = "false"
description = var.main_private_network.description
dns_domain = var.dns_zone.zone_name
mtu = module.common_variables.mtu_size
mtu = module.labs_common_variables.mtu_size
port_security_enabled = true
shared = false
region = module.common_variables.main_region
region = module.labs_common_variables.main_region
tenant_id = var.os_project_data.id
}
@ -26,7 +26,7 @@ resource "openstack_networking_subnet_v2" "main-private-subnet" {
network_id = openstack_networking_network_v2.main-private-network.id
cidr = var.main_private_subnet.cidr
gateway_ip = var.main_private_subnet.gateway_ip
dns_nameservers = module.common_variables.resolvers_ip
dns_nameservers = module.labs_common_variables.resolvers_ip
ip_version = 4
enable_dhcp = true
tenant_id = var.os_project_data.id
@ -37,9 +37,9 @@ resource "openstack_networking_subnet_v2" "main-private-subnet" {
}
resource "openstack_networking_router_v2" "external-router" {
name = module.common_variables.external_router.name
name = var.external_router.name
description = var.external_router.description
external_network_id = module.common_variables.external_network.id
external_network_id = module.labs_common_variables.external_network.id
tenant_id = var.os_project_data.id
enable_snat = true
vendor_options {
@ -57,7 +57,7 @@ resource "openstack_networking_router_interface_v2" "private-network-routing" {
#
# This is the security group that should be added to every instance
resource "openstack_networking_secgroup_v2" "default" {
name = var.default_security_group_name
name = module.labs_common_variables.default_security_group_name
delete_default_rules = "true"
description = "Default security group with rules that allow ssh access from the ISTI networks, http, https"
}

View File

@ -15,7 +15,7 @@ module "ssh_settings" {
}
# Module used
module "common_variables" {
source = "../../modules/common_variables"
module "labs_common_variables" {
source = "../../modules/labs_common_variables"
}

View File

@ -54,9 +54,9 @@ variable "default_firewall_rules_map" {
default = {
"ssh_from_isti_net" = {
description = "SSH from the ISTI network"
source = module.labs_common_variables.ssh_sources.isti_net_cidr
source = "146.48.80.0/21"
port_min = 22
port_max = 22
}
}
}
}