Skip to content

Commit

Permalink
fix: terraform 0.12.10 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiFleKs committed Oct 24, 2019
1 parent 263ccdb commit 3c09cef
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion terraform/modules/eks-addons/cluster-autoscaler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rbac:
image:
tag: ${var.cluster_autoscaler["version"]}
podAnnotations:
iam.amazonaws.com/role: "${aws_iam_role.eks-cluster-autoscaler-kiam[0].arn}"
iam.amazonaws.com/role: "${var.cluster_autoscaler["create_iam_resources_kiam"] ? aws_iam_role.eks-cluster-autoscaler-kiam[0].arn : ""}"
VALUES

}
Expand Down
5 changes: 1 addition & 4 deletions terraform/modules/eks-addons/cni-metrics-helper.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//
// [cni-metrics-helper]
//
resource "aws_iam_policy" "eks-cni-metrics-helper" {
count = var.cni_metrics_helper["create_iam_resources_kiam"] ? 1 : 0
name = "tf-eks-${var.cluster-name}-cni-metrics-helper"
Expand Down Expand Up @@ -46,7 +43,7 @@ data "template_file" "cni_metrics_helper" {
count = var.cni_metrics_helper["enabled"] ? 1 : 0
template = file("templates/cni-metrics-helper.yaml")
vars = {
cni_metrics_helper_role_arn = aws_iam_role.eks-cni-metrics-helper-kiam[count.index].arn
cni_metrics_helper_role_arn = var.cni_metrics_helper["create_iam_resources_kiam"] ? aws_iam_role.eks-cni-metrics-helper-kiam[count.index].arn : ""
cni_metrics_helper_version = var.cni_metrics_helper["version"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/eks-addons/external-dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rbac:
create: true
pspEnabled: true
podAnnotations:
iam.amazonaws.com/role: "${aws_iam_role.eks-external-dns-kiam[0].arn}"
iam.amazonaws.com/role: "${var.external_dns["create_iam_resources_kiam"] ? aws_iam_role.eks-external-dns-kiam[0].arn : ""}"
VALUES

}
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/eks-addons/fluentd-cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nodeSelector:
node-role.kubernetes.io/node: ""
tolerations:
- operator: Exists
awsRole: "${aws_iam_role.eks-fluentd-cloudwatch-kiam[0].arn}"
awsRole: "${var.fluentd_cloudwatch["create_iam_resources_kiam"] ? aws_iam_role.eks-fluentd-cloudwatch-kiam[0].arn : ""}"
awsRegion: "${var.aws["region"]}"
logGroupName: "${aws_cloudwatch_log_group.eks-fluentd-cloudwatch-log-group[0].name}"
extraVars:
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/eks-addons/flux.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ helmOperator:
additionalArgs:
- --k8s-allow-namespace=${var.flux["allowed_namespaces"]}
annotations:
iam.amazonaws.com/role: "${aws_iam_role.eks-flux-kiam[0].arn}"
iam.amazonaws.com/role: "${var.flux["create_iam_resources_kiam"] ? aws_iam_role.eks-flux-kiam[0].arn : ""}"
VALUES

}
Expand Down

0 comments on commit 3c09cef

Please sign in to comment.