Skip to content

Commit 1c6f3dd

Browse files
authored
Merge pull request #217 from tablexi/eks-addons
ADD the ability to manage EKS addons
2 parents 9850ec7 + 319c652 commit 1c6f3dd

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

aws/eks/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ resource "aws_eks_cluster" "main" {
121121
]
122122
}
123123

124+
resource "aws_eks_addon" "main" {
125+
for_each = toset(var.addons)
126+
cluster_name = aws_eks_cluster.main.name
127+
addon_name = each.key
128+
resolve_conflicts = var.addon_resolve_conflicts
129+
}
130+
124131
data "aws_iam_policy_document" "nodes_assume_role_policy" {
125132
version = "2012-10-17"
126133

aws/eks/outputs.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ output "node_iam_role" {
1818
value = aws_iam_role.nodes
1919
}
2020

21-
output "cluster_security_group_id" {
22-
value = aws_eks_cluster.master.vpc_config[0].cluster_security_group_id
23-
}
24-
2521
output "oidc_provider" {
2622
value = aws_iam_openid_connect_provider.default.arn
2723
}

aws/eks/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,15 @@ variable "create_nodes" {
8787
description = "(Optional) Create a node group for the EKS cluster. Defaults to true."
8888
default = true
8989
}
90+
91+
variable "addons" {
92+
description = "(Optional) List of EKS addons to manage"
93+
default = []
94+
type = list(string)
95+
}
96+
97+
variable "addon_resolve_conflicts" {
98+
description = "EKS addon conflict resolution NONE|OVERWRITE"
99+
default = "OVERWRITE"
100+
type = string
101+
}

0 commit comments

Comments
 (0)