Merge pull request #2900 from drekle/configure_openstack_subnet_CIDR
Configure openstack subnet cidr
This commit is contained in:
commit
16bd0d2b5d
5 changed files with 11 additions and 1 deletions
|
@ -3,6 +3,7 @@ module "network" {
|
||||||
|
|
||||||
external_net = "${var.external_net}"
|
external_net = "${var.external_net}"
|
||||||
network_name = "${var.network_name}"
|
network_name = "${var.network_name}"
|
||||||
|
subnet_cidr = "${var.subnet_cidr}"
|
||||||
cluster_name = "${var.cluster_name}"
|
cluster_name = "${var.cluster_name}"
|
||||||
dns_nameservers = "${var.dns_nameservers}"
|
dns_nameservers = "${var.dns_nameservers}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ resource "openstack_networking_network_v2" "k8s" {
|
||||||
resource "openstack_networking_subnet_v2" "k8s" {
|
resource "openstack_networking_subnet_v2" "k8s" {
|
||||||
name = "${var.cluster_name}-internal-network"
|
name = "${var.cluster_name}-internal-network"
|
||||||
network_id = "${openstack_networking_network_v2.k8s.id}"
|
network_id = "${openstack_networking_network_v2.k8s.id}"
|
||||||
cidr = "10.0.0.0/24"
|
cidr = "${var.subnet_cidr}"
|
||||||
ip_version = 4
|
ip_version = 4
|
||||||
dns_nameservers = "${var.dns_nameservers}"
|
dns_nameservers = "${var.dns_nameservers}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,3 +7,5 @@ variable "cluster_name" {}
|
||||||
variable "dns_nameservers" {
|
variable "dns_nameservers" {
|
||||||
type = "list"
|
type = "list"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "subnet_cidr" {}
|
||||||
|
|
|
@ -41,5 +41,6 @@ number_of_k8s_nodes_no_floating_ip = 4
|
||||||
# networking
|
# networking
|
||||||
network_name = "<network>"
|
network_name = "<network>"
|
||||||
external_net = "<UUID>"
|
external_net = "<UUID>"
|
||||||
|
subnet_cidr = "<cidr>"
|
||||||
floatingip_pool = "<pool>"
|
floatingip_pool = "<pool>"
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,12 @@ variable "network_name" {
|
||||||
default = "internal"
|
default = "internal"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "subnet_cidr" {
|
||||||
|
description = "Subnet CIDR block."
|
||||||
|
type = "string"
|
||||||
|
default = "10.0.0.0/24"
|
||||||
|
}
|
||||||
|
|
||||||
variable "dns_nameservers" {
|
variable "dns_nameservers" {
|
||||||
description = "An array of DNS name server names used by hosts in this subnet."
|
description = "An array of DNS name server names used by hosts in this subnet."
|
||||||
type = "list"
|
type = "list"
|
||||||
|
|
Loading…
Reference in a new issue