From a06f641b6c384ed1f6a9d913fb2789f668b50ded Mon Sep 17 00:00:00 2001 From: Derek Lemon Date: Thu, 14 Jun 2018 16:40:32 +0000 Subject: [PATCH] Configurable openstack subnet cidr --- contrib/terraform/openstack/modules/network/main.tf | 2 +- contrib/terraform/openstack/modules/network/variables.tf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/terraform/openstack/modules/network/main.tf b/contrib/terraform/openstack/modules/network/main.tf index 2c461c784..7c02869d4 100644 --- a/contrib/terraform/openstack/modules/network/main.tf +++ b/contrib/terraform/openstack/modules/network/main.tf @@ -12,7 +12,7 @@ resource "openstack_networking_network_v2" "k8s" { resource "openstack_networking_subnet_v2" "k8s" { name = "${var.cluster_name}-internal-network" network_id = "${openstack_networking_network_v2.k8s.id}" - cidr = "10.0.0.0/24" + cidr = "${var.subnet_cidr}" ip_version = 4 dns_nameservers = "${var.dns_nameservers}" } diff --git a/contrib/terraform/openstack/modules/network/variables.tf b/contrib/terraform/openstack/modules/network/variables.tf index a7952bced..c8382b15e 100644 --- a/contrib/terraform/openstack/modules/network/variables.tf +++ b/contrib/terraform/openstack/modules/network/variables.tf @@ -7,3 +7,8 @@ variable "cluster_name" {} variable "dns_nameservers" { type = "list" } + +variable "subnet_cidr" { + type = "string" + default = "10.0.0.0/24" +}