You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
4.7 KiB

  1. provider "openstack" {
  2. version = "~> 1.17"
  3. }
  4. module "network" {
  5. source = "./modules/network"
  6. external_net = "${var.external_net}"
  7. network_name = "${var.network_name}"
  8. subnet_cidr = "${var.subnet_cidr}"
  9. cluster_name = "${var.cluster_name}"
  10. dns_nameservers = "${var.dns_nameservers}"
  11. network_dns_domain = "${var.network_dns_domain}"
  12. use_neutron = "${var.use_neutron}"
  13. }
  14. module "ips" {
  15. source = "./modules/ips"
  16. number_of_k8s_masters = "${var.number_of_k8s_masters}"
  17. number_of_k8s_masters_no_etcd = "${var.number_of_k8s_masters_no_etcd}"
  18. number_of_k8s_nodes = "${var.number_of_k8s_nodes}"
  19. floatingip_pool = "${var.floatingip_pool}"
  20. number_of_bastions = "${var.number_of_bastions}"
  21. external_net = "${var.external_net}"
  22. network_name = "${var.network_name}"
  23. router_id = "${module.network.router_id}"
  24. }
  25. module "compute" {
  26. source = "./modules/compute"
  27. cluster_name = "${var.cluster_name}"
  28. az_list = "${var.az_list}"
  29. number_of_k8s_masters = "${var.number_of_k8s_masters}"
  30. number_of_k8s_masters_no_etcd = "${var.number_of_k8s_masters_no_etcd}"
  31. number_of_etcd = "${var.number_of_etcd}"
  32. number_of_k8s_masters_no_floating_ip = "${var.number_of_k8s_masters_no_floating_ip}"
  33. number_of_k8s_masters_no_floating_ip_no_etcd = "${var.number_of_k8s_masters_no_floating_ip_no_etcd}"
  34. number_of_k8s_nodes = "${var.number_of_k8s_nodes}"
  35. number_of_bastions = "${var.number_of_bastions}"
  36. number_of_k8s_nodes_no_floating_ip = "${var.number_of_k8s_nodes_no_floating_ip}"
  37. number_of_gfs_nodes_no_floating_ip = "${var.number_of_gfs_nodes_no_floating_ip}"
  38. bastion_root_volume_size_in_gb = "${var.bastion_root_volume_size_in_gb}"
  39. etcd_root_volume_size_in_gb = "${var.etcd_root_volume_size_in_gb}"
  40. master_root_volume_size_in_gb = "${var.master_root_volume_size_in_gb}"
  41. node_root_volume_size_in_gb = "${var.node_root_volume_size_in_gb}"
  42. gfs_root_volume_size_in_gb = "${var.gfs_root_volume_size_in_gb}"
  43. gfs_volume_size_in_gb = "${var.gfs_volume_size_in_gb}"
  44. public_key_path = "${var.public_key_path}"
  45. image = "${var.image}"
  46. image_gfs = "${var.image_gfs}"
  47. ssh_user = "${var.ssh_user}"
  48. ssh_user_gfs = "${var.ssh_user_gfs}"
  49. flavor_k8s_master = "${var.flavor_k8s_master}"
  50. flavor_k8s_node = "${var.flavor_k8s_node}"
  51. flavor_etcd = "${var.flavor_etcd}"
  52. flavor_gfs_node = "${var.flavor_gfs_node}"
  53. network_name = "${var.network_name}"
  54. flavor_bastion = "${var.flavor_bastion}"
  55. k8s_master_fips = "${module.ips.k8s_master_fips}"
  56. k8s_master_no_etcd_fips = "${module.ips.k8s_master_no_etcd_fips}"
  57. k8s_node_fips = "${module.ips.k8s_node_fips}"
  58. bastion_fips = "${module.ips.bastion_fips}"
  59. bastion_allowed_remote_ips = "${var.bastion_allowed_remote_ips}"
  60. master_allowed_remote_ips = "${var.master_allowed_remote_ips}"
  61. k8s_allowed_remote_ips = "${var.k8s_allowed_remote_ips}"
  62. k8s_allowed_egress_ips = "${var.k8s_allowed_egress_ips}"
  63. supplementary_master_groups = "${var.supplementary_master_groups}"
  64. supplementary_node_groups = "${var.supplementary_node_groups}"
  65. worker_allowed_ports = "${var.worker_allowed_ports}"
  66. wait_for_floatingip = "${var.wait_for_floatingip}"
  67. use_access_ip = "${var.use_access_ip}"
  68. network_id = "${module.network.router_id}"
  69. }
  70. output "private_subnet_id" {
  71. value = "${module.network.subnet_id}"
  72. }
  73. output "floating_network_id" {
  74. value = "${var.external_net}"
  75. }
  76. output "router_id" {
  77. value = "${module.network.router_id}"
  78. }
  79. output "k8s_master_fips" {
  80. value = "${concat(module.ips.k8s_master_fips, module.ips.k8s_master_no_etcd_fips)}"
  81. }
  82. output "k8s_node_fips" {
  83. value = "${module.ips.k8s_node_fips}"
  84. }
  85. output "bastion_fips" {
  86. value = "${module.ips.bastion_fips}"
  87. }