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.

24 lines
749 B

  1. resource "openstack_networking_router_v2" "k8s" {
  2. name = "${var.cluster_name}-router"
  3. admin_state_up = "true"
  4. external_gateway = "${var.external_net}"
  5. }
  6. resource "openstack_networking_network_v2" "k8s" {
  7. name = "${var.network_name}"
  8. admin_state_up = "true"
  9. }
  10. resource "openstack_networking_subnet_v2" "k8s" {
  11. name = "${var.cluster_name}-internal-network"
  12. network_id = "${openstack_networking_network_v2.k8s.id}"
  13. cidr = "10.0.0.0/24"
  14. ip_version = 4
  15. dns_nameservers = "${var.dns_nameservers}"
  16. }
  17. resource "openstack_networking_router_interface_v2" "k8s" {
  18. router_id = "${openstack_networking_router_v2.k8s.id}"
  19. subnet_id = "${openstack_networking_subnet_v2.k8s.id}"
  20. }