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.

91 lines
3.9 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. use_neutron = "${var.use_neutron}"
  12. }
  13. module "ips" {
  14. source = "modules/ips"
  15. number_of_k8s_masters = "${var.number_of_k8s_masters}"
  16. number_of_k8s_masters_no_etcd = "${var.number_of_k8s_masters_no_etcd}"
  17. number_of_k8s_nodes = "${var.number_of_k8s_nodes}"
  18. floatingip_pool = "${var.floatingip_pool}"
  19. number_of_bastions = "${var.number_of_bastions}"
  20. external_net = "${var.external_net}"
  21. network_name = "${var.network_name}"
  22. router_id = "${module.network.router_id}"
  23. }
  24. module "compute" {
  25. source = "modules/compute"
  26. cluster_name = "${var.cluster_name}"
  27. az_list = "${var.az_list}"
  28. number_of_k8s_masters = "${var.number_of_k8s_masters}"
  29. number_of_k8s_masters_no_etcd = "${var.number_of_k8s_masters_no_etcd}"
  30. number_of_etcd = "${var.number_of_etcd}"
  31. number_of_k8s_masters_no_floating_ip = "${var.number_of_k8s_masters_no_floating_ip}"
  32. number_of_k8s_masters_no_floating_ip_no_etcd = "${var.number_of_k8s_masters_no_floating_ip_no_etcd}"
  33. number_of_k8s_nodes = "${var.number_of_k8s_nodes}"
  34. number_of_bastions = "${var.number_of_bastions}"
  35. number_of_k8s_nodes_no_floating_ip = "${var.number_of_k8s_nodes_no_floating_ip}"
  36. number_of_gfs_nodes_no_floating_ip = "${var.number_of_gfs_nodes_no_floating_ip}"
  37. gfs_volume_size_in_gb = "${var.gfs_volume_size_in_gb}"
  38. public_key_path = "${var.public_key_path}"
  39. image = "${var.image}"
  40. image_gfs = "${var.image_gfs}"
  41. ssh_user = "${var.ssh_user}"
  42. ssh_user_gfs = "${var.ssh_user_gfs}"
  43. flavor_k8s_master = "${var.flavor_k8s_master}"
  44. flavor_k8s_node = "${var.flavor_k8s_node}"
  45. flavor_etcd = "${var.flavor_etcd}"
  46. flavor_gfs_node = "${var.flavor_gfs_node}"
  47. network_name = "${var.network_name}"
  48. flavor_bastion = "${var.flavor_bastion}"
  49. k8s_master_fips = "${module.ips.k8s_master_fips}"
  50. k8s_node_fips = "${module.ips.k8s_node_fips}"
  51. bastion_fips = "${module.ips.bastion_fips}"
  52. bastion_allowed_remote_ips = "${var.bastion_allowed_remote_ips}"
  53. master_allowed_remote_ips = "${var.master_allowed_remote_ips}"
  54. k8s_allowed_remote_ips = "${var.k8s_allowed_remote_ips}"
  55. k8s_allowed_egress_ips = "${var.k8s_allowed_egress_ips}"
  56. supplementary_master_groups = "${var.supplementary_master_groups}"
  57. supplementary_node_groups = "${var.supplementary_node_groups}"
  58. worker_allowed_ports = "${var.worker_allowed_ports}"
  59. network_id = "${module.network.router_id}"
  60. }
  61. output "private_subnet_id" {
  62. value = "${module.network.subnet_id}"
  63. }
  64. output "floating_network_id" {
  65. value = "${var.external_net}"
  66. }
  67. output "router_id" {
  68. value = "${module.network.router_id}"
  69. }
  70. output "k8s_master_fips" {
  71. value = "${module.ips.k8s_master_fips}"
  72. }
  73. output "k8s_node_fips" {
  74. value = "${module.ips.k8s_node_fips}"
  75. }
  76. output "bastion_fips" {
  77. value = "${module.ips.bastion_fips}"
  78. }