Skip to content

Commit 2ea3c6e

Browse files
committed
added vpc_cidr and subnet_cidr variables
1 parent 8a402d6 commit 2ea3c6e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

infrastructure-as-code/k8s-cluster-openshift-aws/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ module "openshift" {
4141
source = "./modules/openshift"
4242
region = "${var.region}"
4343
amisize = "t2.large" // Smallest that meets OS specs
44-
vpc_cidr = "10.0.0.0/16"
44+
vpc_cidr = "${var.vpc_cidr}"
45+
subnet_cidr = "${var.subnet_cidr}"
4546
subnetaz = "${var.subnetaz}"
46-
subnet_cidr = "10.0.1.0/24"
4747
key_name = "${var.key_name}"
4848
private_key_data = "${var.private_key_data}"
4949
name_tag_prefix = "${var.name_tag_prefix}"

infrastructure-as-code/k8s-cluster-openshift-aws/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ variable "private_key_data" {
1212
description = "contents of the private key"
1313
}
1414

15+
variable "vpc_cidr" {
16+
description = "VPC CIDR"
17+
default "10.0.0.0/16"
18+
}
19+
20+
variable "subnet_cidr" {
21+
description = "Subnet CIDR"
22+
default "10.0.1.0/24"
23+
}
24+
1525
// This map defines which AZ to put the 'Public Subnet' in, based on the
1626
// region defined. You will typically not need to change this unless
1727
// you are running in a new region!

0 commit comments

Comments
 (0)