diff --git a/iam.tf b/iam.tf index 6a49ae9..97ea6c0 100644 --- a/iam.tf +++ b/iam.tf @@ -1,6 +1,6 @@ resource "kubernetes_namespace" "alb_ingress" { - depends_on = [var.mod_dependency] - count = (var.enabled && var.k8s_namespace != "kube-system") ? 1 : 0 + depends_on = [var.mod_dependency] + count = (var.enabled && var.k8s_namespace != "kube-system") ? 1 : 0 metadata { name = var.k8s_namespace @@ -10,8 +10,8 @@ resource "kubernetes_namespace" "alb_ingress" { ### iam ### # Policy data "aws_iam_policy_document" "alb_ingress" { - depends_on = [var.mod_dependency] - count = var.enabled ? 1 : 0 + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 statement { actions = [ @@ -143,7 +143,7 @@ data "aws_iam_policy_document" "alb_ingress" { } resource "aws_iam_policy" "alb_ingress" { - depends_on = [var.mod_dependency] + depends_on = [var.mod_dependency] count = var.enabled ? 1 : 0 name = "${var.cluster_name}-alb-ingress" path = "/" @@ -154,8 +154,8 @@ resource "aws_iam_policy" "alb_ingress" { # Role data "aws_iam_policy_document" "alb_ingress_assume" { - depends_on = [var.mod_dependency] - count = var.enabled ? 1 : 0 + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 statement { actions = ["sts:AssumeRoleWithWebIdentity"] @@ -179,14 +179,14 @@ data "aws_iam_policy_document" "alb_ingress_assume" { } resource "aws_iam_role" "alb_ingress" { - depends_on = [var.mod_dependency] + depends_on = [var.mod_dependency] count = var.enabled ? 1 : 0 name = "${var.cluster_name}-alb-ingress" assume_role_policy = data.aws_iam_policy_document.alb_ingress_assume[0].json } resource "aws_iam_role_policy_attachment" "alb_ingress" { - depends_on = [var.mod_dependency] + depends_on = [var.mod_dependency] count = var.enabled ? 1 : 0 role = aws_iam_role.alb_ingress[0].name policy_arn = aws_iam_policy.alb_ingress[0].arn diff --git a/main.tf b/main.tf index 8309a52..581ff13 100644 --- a/main.tf +++ b/main.tf @@ -1,11 +1,11 @@ data "helm_repository" "default" { - depends_on = [var.mod_dependency] - name = var.helm_repo_name - url = var.helm_repo_url + depends_on = [var.mod_dependency] + name = var.helm_repo_name + url = var.helm_repo_url } resource "helm_release" "alb_ingress" { - depends_on = [var.mod_dependency] + depends_on = [var.mod_dependency] count = var.enabled ? 1 : 0 name = var.helm_release_name repository = data.helm_repository.default.metadata[0].name diff --git a/variables.tf b/variables.tf index 0dcde03..a5cf76e 100644 --- a/variables.tf +++ b/variables.tf @@ -30,7 +30,7 @@ variable "helm_release_name" { } variable "helm_repo_name" { - default = "incubator" + default = "eks-incubator" } variable "helm_repo_url" {