Skip to content

Commit 86c9c73

Browse files
committed
feat: (PSKD-709) Additional updates and clean up
1 parent 7e4fc3c commit 86c9c73

File tree

5 files changed

+10
-23
lines changed

5 files changed

+10
-23
lines changed

main.tf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,12 @@ module "google_netapp" {
307307

308308
count = var.storage_type == "ha" && local.storage_type_backend == "netapp" ? 1 : 0
309309

310-
prefix = var.prefix
311-
region = local.region
312-
network = module.vpc.network_name
313-
service_level = var.netapp_service_level
314-
capacity_gib = var.netapp_capacity_gib
315-
protocols = var.netapp_protocols
316-
# netapp_subnet_cidr = var.netapp_subnet_cidr
310+
prefix = var.prefix
311+
region = local.region
312+
network = module.vpc.network_name
313+
service_level = var.netapp_service_level
314+
capacity_gib = var.netapp_capacity_gib
315+
protocols = var.netapp_protocols
317316
volume_path = "${var.prefix}-${var.netapp_volume_path}"
318317
allowed_clients = join(",", [local.gke_subnet_cidr, local.misc_subnet_cidr])
319318
}

modules/google_netapp/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ output "mountpath" {
44

55
output "export_ip" {
66
value = split(":", google_netapp_volume.netapp-nfs-volume.mount_options[0].export_full)[0]
7-
}
7+
}

modules/google_netapp/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,3 @@ variable "allowed_clients" {
4646
type = string
4747
default = "0.0.0.0/0"
4848
}
49-
50-
# variable "netapp_subnet_cidr" {
51-
# description = "Address space for Google NetApp Volumes subnet"
52-
# type = string
53-
# default = "192.168.5.0/24"
54-
# }

variables.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ variable "storage_type_backend" {
192192

193193
validation {
194194
condition = contains(["nfs", "filestore", "netapp", "none"], lower(var.storage_type_backend))
195-
error_message = "ERROR: Supported values for `storage_type_backend` are nfs, filestore, netapp and none."
195+
error_message = "ERROR: Supported values for `storage_type_backend` are nfs, filestore, netapp or none."
196196
}
197197
}
198198

@@ -566,12 +566,6 @@ variable "database_subnet_cidr" {
566566
default = "192.168.4.0/23"
567567
}
568568

569-
# variable "netapp_subnet_cidr" {
570-
# description = "Address space for Google NetApp Volumes subnet"
571-
# type = string
572-
# default = "192.168.5.0/24"
573-
# }
574-
575569
variable "gke_network_policy" {
576570
description = "Sets up network policy to be used with GKE CNI. Network policy allows us to control the traffic flow between pods. Currently supported values are true (calico) and false (kubenet). Changing this forces a new resource to be created."
577571
type = bool

vms.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ locals {
1212
: var.storage_type == "ha" && local.storage_type_backend == "filestore" ? "/${google_filestore_instance.rwx[0].file_shares[0].name}"
1313
: var.storage_type == "ha" && local.storage_type_backend == "netapp" ? "/${module.google_netapp[0].mountpath}" : "/export"
1414
)
15-
protocol_version = var.storage_type == "ha" && var.storage_type_backend == "netapp" ? split("V", var.netapp_protocols[0])[1] == "4" ? "4.1" : "3" : "3"
15+
protocol_version = var.storage_type == "ha" && local.storage_type_backend == "netapp" ? split("V", var.netapp_protocols[0])[1] == "4" ? "4.1" : "3" : "3"
1616

1717
}
1818

1919
module "nfs_server" {
2020
source = "./modules/google_vm"
2121
project = var.project
22-
count = var.storage_type == "standard" && var.storage_type_backend == "nfs" ? 1 : 0
22+
count = var.storage_type == "standard" && local.storage_type_backend == "nfs" ? 1 : 0
2323
create_public_ip = var.create_nfs_public_ip
2424

2525
name = "${var.prefix}-nfs-server"

0 commit comments

Comments
 (0)