Configurable openstack subnet cidr

This commit is contained in:
Derek Lemon 2018-06-14 16:40:32 +00:00
parent 72504d26dc
commit a06f641b6c
2 changed files with 6 additions and 1 deletions

View file

@ -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}"
} }

View file

@ -7,3 +7,8 @@ variable "cluster_name" {}
variable "dns_nameservers" { variable "dns_nameservers" {
type = "list" type = "list"
} }
variable "subnet_cidr" {
type = "string"
default = "10.0.0.0/24"
}