Skip to content

Commit

Permalink
feat: Resolved warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AshutoshAM2002 committed Jan 19, 2024
1 parent 627cdf1 commit 76ca81e
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 92 deletions.
11 changes: 5 additions & 6 deletions addons/cert-manager/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module "helm_addon" {
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
addon_context = var.addon_context
namespace = local.default_helm_config.namespace
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
namespace = local.default_helm_config.namespace
}
9 changes: 0 additions & 9 deletions addons/cert-manager/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ variable "certification_manager_extra_configs" {
default = {}
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
gcp_region_name = string
gke_cluster_id = string
tags = map(string)
})
}

variable "project_id" {
description = "GCP project ID"
type = string
Expand Down
9 changes: 4 additions & 5 deletions addons/cluster-autoscaler/main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module "helm_addon" {
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
addon_context = var.addon_context
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment

set_values = [
{
Expand Down
9 changes: 0 additions & 9 deletions addons/cluster-autoscaler/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ variable "cluster_autoscaler_extra_configs" {
default = {}
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
gcp_region_name = string
gke_cluster_id = string
tags = map(string)
})
}

variable "project_id" {
description = "GCP project ID"
type = string
Expand Down
5 changes: 0 additions & 5 deletions addons/helm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ variable "workload_identity_config" {
default = {}
}

variable "addon_context" {
description = "workload identity Input configuration for the addon"
type = any
}

variable "project_id" {

Check warning on line 31 in addons/helm/variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "project_id" is declared but not used
description = "GCP project ID"
type = string
Expand Down
11 changes: 5 additions & 6 deletions addons/ingress-nginx/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module "helm_addon" {
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
addon_context = var.addon_context
namespace = local.default_helm_config.namespace
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
namespace = local.default_helm_config.namespace
}
9 changes: 0 additions & 9 deletions addons/ingress-nginx/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ variable "project_id" {
type = string
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
gcp_region_name = string
gke_cluster_id = string
tags = map(string)
})
}

variable "ingress_nginx_extra_configs" {
description = "Nginx ingress extra config"
type = any
Expand Down
11 changes: 5 additions & 6 deletions addons/keda/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module "helm_addon" {
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
addon_context = var.addon_context
namespace = local.default_helm_config.namespace
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
namespace = local.default_helm_config.namespace
}
9 changes: 0 additions & 9 deletions addons/keda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ variable "keda_extra_configs" {
default = {}
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
gcp_region_name = string
gke_cluster_id = string
tags = map(string)
})
}

variable "workload_identity_config" {

Check warning on line 13 in addons/keda/variables.tf

View workflow job for this annotation

GitHub Actions / tf-lint / tflint

variable "workload_identity_config" is declared but not used
description = "Input configuration for IRSA module"
type = any
Expand Down
11 changes: 5 additions & 6 deletions addons/reloader/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module "helm_addon" {
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
addon_context = var.addon_context
namespace = local.default_helm_config.namespace
source = "../helm"
helm_config = local.helm_config
project_id = var.project_id
environment = var.environment
namespace = local.default_helm_config.namespace
}
9 changes: 0 additions & 9 deletions addons/reloader/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ variable "helm_config" {
default = {}
}

variable "addon_context" {
description = "Input configuration for the addon"
type = object({
gcp_region_name = string
gke_cluster_id = string
tags = map(string)
})
}

variable "project_id" {
description = "GCP project ID"
type = string
Expand Down
8 changes: 1 addition & 7 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
locals {
addon_context = {
gcp_region_name = data.google_client_config.current.region
gke_cluster_id = data.google_container_cluster.my_cluster.name
tags = var.tags
}
}
locals {}
7 changes: 1 addition & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module "cluster_autoscaler" {
environment = var.environment
project_id = var.project_id
gke_cluster_name = data.google_container_cluster.my_cluster.name
addon_context = local.addon_context
cluster_autoscaler_extra_configs = var.cluster_autoscaler_extra_configs
helm_config = var.cluster_autoscaler_helm_config != null ? var.cluster_autoscaler_helm_config : { values = [local_file.cluster_autoscaler_helm_config[count.index].content] }
}
Expand All @@ -14,7 +13,6 @@ module "reloader" {
count = var.reloader ? 1 : 0
environment = var.environment
project_id = var.project_id
addon_context = local.addon_context
reloader_extra_configs = var.reloader_extra_configs
helm_config = var.reloader_helm_config != null ? var.reloader_helm_config : { values = [local_file.reloader_helm_config[count.index].content] }
}
Expand All @@ -24,7 +22,6 @@ module "ingress_nginx" {
count = var.ingress_nginx ? 1 : 0
environment = var.environment
project_id = var.project_id
addon_context = local.addon_context
ingress_nginx_extra_configs = var.ingress_nginx_extra_configs
helm_config = var.ingress_nginx_helm_config != null ? var.ingress_nginx_helm_config : { values = [local_file.ingress_nginx_helm_config[count.index].content] }
}
Expand All @@ -34,8 +31,7 @@ module "certification_manager" {
source = "./addons/cert-manager"
count = var.certification_manager ? 1 : 0
environment = var.environment
project_id = var.project_id
addon_context = local.addon_context
project_id = var.project_idt
certification_manager_extra_configs = var.certification_manager_extra_configs
helm_config = var.certification_manager_helm_config != null ? var.certification_manager_helm_config : { values = [local_file.certification_manager_helm_config[count.index].content] }
}
Expand All @@ -45,7 +41,6 @@ module "keda" {
count = var.keda ? 1 : 0
environment = var.environment
project_id = var.project_id
addon_context = local.addon_context
keda_extra_configs = var.keda_extra_configs
helm_config = var.keda_helm_config != null ? var.keda_helm_config : { values = [local_file.keda_helm_config[count.index].content] }
}

0 comments on commit 76ca81e

Please sign in to comment.