2017-12-05 20:48:47 +08:00
module " network " {
2019-08-18 16:30:05 +08:00
source = " ./modules/network "
2017-12-05 20:48:47 +08:00
2022-01-15 04:58:32 +08:00
external_net = var . external_net
network_name = var . network_name
subnet_cidr = var . subnet_cidr
cluster_name = var . cluster_name
dns_nameservers = var . dns_nameservers
network_dns_domain = var . network_dns_domain
use_neutron = var . use_neutron
port_security_enabled = var . port_security_enabled
router_id = var . router_id
2017-12-05 20:48:47 +08:00
}
module " ips " {
2019-08-18 16:30:05 +08:00
source = " ./modules/ips "
2017-12-05 20:48:47 +08:00
2020-06-05 15:05:43 +08:00
number_of_k8s_masters = var . number_of_k8s_masters
number_of_k8s_masters_no_etcd = var . number_of_k8s_masters_no_etcd
number_of_k8s_nodes = var . number_of_k8s_nodes
floatingip_pool = var . floatingip_pool
number_of_bastions = var . number_of_bastions
external_net = var . external_net
network_name = var . network_name
router_id = module . network . router_id
k8s_nodes = var . k8s_nodes
2022-05-03 23:51:56 +08:00
k8s_masters = var . k8s_masters
2020-10-12 14:54:47 +08:00
k8s_master_fips = var . k8s_master_fips
2021-11-19 23:58:52 +08:00
bastion_fips = var . bastion_fips
2020-11-06 16:16:50 +08:00
router_internal_port_id = module . network . router_internal_port_id
2017-12-05 20:48:47 +08:00
}
module " compute " {
2019-08-18 16:30:05 +08:00
source = " ./modules/compute "
2017-12-05 20:48:47 +08:00
2020-06-05 15:05:43 +08:00
cluster_name = var . cluster_name
az_list = var . az_list
az_list_node = var . az_list_node
number_of_k8s_masters = var . number_of_k8s_masters
number_of_k8s_masters_no_etcd = var . number_of_k8s_masters_no_etcd
number_of_etcd = var . number_of_etcd
number_of_k8s_masters_no_floating_ip = var . number_of_k8s_masters_no_floating_ip
number_of_k8s_masters_no_floating_ip_no_etcd = var . number_of_k8s_masters_no_floating_ip_no_etcd
number_of_k8s_nodes = var . number_of_k8s_nodes
number_of_bastions = var . number_of_bastions
number_of_k8s_nodes_no_floating_ip = var . number_of_k8s_nodes_no_floating_ip
number_of_gfs_nodes_no_floating_ip = var . number_of_gfs_nodes_no_floating_ip
2022-05-03 23:51:56 +08:00
k8s_masters = var . k8s_masters
2020-06-05 15:05:43 +08:00
k8s_nodes = var . k8s_nodes
bastion_root_volume_size_in_gb = var . bastion_root_volume_size_in_gb
etcd_root_volume_size_in_gb = var . etcd_root_volume_size_in_gb
master_root_volume_size_in_gb = var . master_root_volume_size_in_gb
node_root_volume_size_in_gb = var . node_root_volume_size_in_gb
gfs_root_volume_size_in_gb = var . gfs_root_volume_size_in_gb
gfs_volume_size_in_gb = var . gfs_volume_size_in_gb
2020-08-18 15:49:29 +08:00
master_volume_type = var . master_volume_type
2021-12-01 04:59:01 +08:00
node_volume_type = var . node_volume_type
2020-06-05 15:05:43 +08:00
public_key_path = var . public_key_path
image = var . image
2021-02-16 23:05:06 +08:00
image_uuid = var . image_uuid
2020-06-05 15:05:43 +08:00
image_gfs = var . image_gfs
2021-02-16 23:05:06 +08:00
image_master = var . image_master
image_master_uuid = var . image_master_uuid
image_gfs_uuid = var . image_gfs_uuid
2020-06-05 15:05:43 +08:00
ssh_user = var . ssh_user
ssh_user_gfs = var . ssh_user_gfs
flavor_k8s_master = var . flavor_k8s_master
flavor_k8s_node = var . flavor_k8s_node
flavor_etcd = var . flavor_etcd
flavor_gfs_node = var . flavor_gfs_node
network_name = var . network_name
flavor_bastion = var . flavor_bastion
k8s_master_fips = module . ips . k8s_master_fips
k8s_master_no_etcd_fips = module . ips . k8s_master_no_etcd_fips
2022-05-03 23:51:56 +08:00
k8s_masters_fips = module . ips . k8s_masters_fips
2020-06-05 15:05:43 +08:00
k8s_node_fips = module . ips . k8s_node_fips
k8s_nodes_fips = module . ips . k8s_nodes_fips
bastion_fips = module . ips . bastion_fips
bastion_allowed_remote_ips = var . bastion_allowed_remote_ips
2023-08-28 18:07:03 +08:00
bastion_allowed_remote_ipv6_ips = var . bastion_allowed_remote_ipv6_ips
2020-06-05 15:05:43 +08:00
master_allowed_remote_ips = var . master_allowed_remote_ips
2023-08-28 18:07:03 +08:00
master_allowed_remote_ipv6_ips = var . master_allowed_remote_ipv6_ips
2020-06-05 15:05:43 +08:00
k8s_allowed_remote_ips = var . k8s_allowed_remote_ips
2023-08-28 18:07:03 +08:00
k8s_allowed_remote_ips_ipv6 = var . k8s_allowed_remote_ips_ipv6
2020-06-05 15:05:43 +08:00
k8s_allowed_egress_ips = var . k8s_allowed_egress_ips
2023-08-28 18:07:03 +08:00
k8s_allowed_egress_ipv6_ips = var . k8s_allowed_egress_ipv6_ips
2020-06-05 15:05:43 +08:00
supplementary_master_groups = var . supplementary_master_groups
supplementary_node_groups = var . supplementary_node_groups
2020-08-27 17:07:13 +08:00
master_allowed_ports = var . master_allowed_ports
2023-08-28 18:07:03 +08:00
master_allowed_ports_ipv6 = var . master_allowed_ports_ipv6
2020-06-05 15:05:43 +08:00
worker_allowed_ports = var . worker_allowed_ports
2023-08-28 18:07:03 +08:00
worker_allowed_ports_ipv6 = var . worker_allowed_ports_ipv6
2022-09-28 13:03:35 +08:00
bastion_allowed_ports = var . bastion_allowed_ports
2023-08-28 18:07:03 +08:00
bastion_allowed_ports_ipv6 = var . bastion_allowed_ports_ipv6
2020-06-05 15:05:43 +08:00
use_access_ip = var . use_access_ip
2021-11-22 18:53:09 +08:00
master_server_group_policy = var . master_server_group_policy
node_server_group_policy = var . node_server_group_policy
etcd_server_group_policy = var . etcd_server_group_policy
2020-11-05 21:30:54 +08:00
extra_sec_groups = var . extra_sec_groups
extra_sec_groups_name = var . extra_sec_groups_name
2021-06-25 15:26:45 +08:00
group_vars_path = var . group_vars_path
2022-01-15 04:58:32 +08:00
port_security_enabled = var . port_security_enabled
2022-05-03 23:51:56 +08:00
force_null_port_security = var . force_null_port_security
network_router_id = module . network . router_id
network_id = module . network . network_id
use_existing_network = var . use_existing_network
2022-09-30 15:48:29 +08:00
private_subnet_id = module . network . subnet_id
2023-01-05 20:16:00 +08:00
additional_server_groups = var . additional_server_groups
2022-08-18 15:56:43 +08:00
depends_on = [
module . network . subnet_id
]
2016-10-26 22:56:15 +08:00
}
2017-12-06 22:58:40 +08:00
output " private_subnet_id " {
2020-06-05 15:05:43 +08:00
value = module . network . subnet_id
2017-12-06 22:58:40 +08:00
}
output " floating_network_id " {
2020-06-05 15:05:43 +08:00
value = var . external_net
2017-12-06 22:58:40 +08:00
}
output " router_id " {
2020-06-05 15:05:43 +08:00
value = module . network . router_id
2017-12-06 22:58:40 +08:00
}
output " k8s_master_fips " {
2022-08-18 15:56:43 +08:00
value = var . number_of_k8s_masters + var . number_of_k8s_masters_no_etcd > 0 ? concat ( module . ips . k8s_master_fips , module . ips . k8s_master_no_etcd_fips ) : [ for key , value in module . ips . k8s_masters_fips : value . address ]
2017-12-06 22:58:40 +08:00
}
output " k8s_node_fips " {
2020-06-05 15:05:43 +08:00
value = var . number_of_k8s_nodes > 0 ? module . ips . k8s_node_fips : [ for key , value in module . ips . k8s_nodes_fips : value . address ]
2017-12-06 22:58:40 +08:00
}
output " bastion_fips " {
2020-06-05 15:05:43 +08:00
value = module . ips . bastion_fips
2017-12-06 22:58:40 +08:00
}