diff --git a/nginx-ingress.tf b/nginx-ingress.tf index 2f06150..a181605 100644 --- a/nginx-ingress.tf +++ b/nginx-ingress.tf @@ -1,4 +1,6 @@ resource "helm_release" "nginx-ingress-controller" { + count = var.enable_nginx_ingress_controller == "true" ? 1 : 0 + namespace = "nginx-ingress" create_namespace = true @@ -6,7 +8,7 @@ resource "helm_release" "nginx-ingress-controller" { repository = "https://kubernetes.github.io/ingress-nginx" chart = "ingress-nginx" version = "4.8.0" - timeout = 600 + timeout = 600 set { name = "rbac.create" diff --git a/variables.tf b/variables.tf index 86b1a74..88883b6 100644 --- a/variables.tf +++ b/variables.tf @@ -109,3 +109,9 @@ variable "tags" { type = map(any) description = "List of custom tags to add to the install resources. Used for taxonomic purposes." } + +variable "enable_nginx_ingress_controller" { + type = string + default = "true" + description = "Toggle the nginx-ingress controller in the EKS cluster." +}