Skip to content

Commit a7f80c0

Browse files
committed
feat: added the eks addons
1 parent c1a743d commit a7f80c0

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,13 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
452452
| <a name="input_tags"></a> [tags](#input\_tags) | Tags to apply to all resources | `map(string)` | n/a | yes |
453453
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | ID of the VPC where the EKS cluster will be created | `string` | n/a | yes |
454454
| <a name="input_access_entries"></a> [access\_entries](#input\_access\_entries) | Map of access entries to add to the cluster. This is required if you use a different IAM Role for Terraform Plan actions. | <pre>map(object({<br/> ## The list of kubernetes groups to associate the principal with<br/> kubernetes_groups = optional(list(string))<br/> ## The list of kubernetes users to associate the principal with<br/> principal_arn = string<br/> ## The list of kubernetes users to associate the principal with<br/> policy_associations = optional(map(object({<br/> ## The policy arn to associate with the principal<br/> policy_arn = string<br/> ## The access scope for the policy i.e. cluster or namespace<br/> access_scope = object({<br/> ## The namespaces to apply the policy to<br/> namespaces = optional(list(string))<br/> ## The type of access scope i.e. cluster or namespace<br/> type = string<br/> })<br/> })))<br/> }))</pre> | `null` | no |
455+
| <a name="input_addons"></a> [addons](#input\_addons) | Map of EKS addons to enable | <pre>map(object({<br/> ## The name of the EKS addon<br/> name = optional(string)<br/> ## Indicates if we should deploy the EKS addon before the compute nodes<br/> before_compute = optional(bool, false)<br/> ## Indicates if we should use the most recent version of the EKS addon<br/> most_recent = optional(bool, true)<br/> ## The version of the EKS addon<br/> addon_version = optional(string)<br/> ## The configuration values for the EKS addon<br/> configuration_values = optional(string)<br/> ## The pod identity association for the EKS addon<br/> pod_identity_association = optional(list(object({<br/> ## The role ARN for the EKS addon pod identity association<br/> role_arn = string<br/> ## The service account for the EKS addon<br/> service_account = string<br/> })))<br/> ## Indicates if we should preserve the EKS addon<br/> preserve = optional(bool, true)<br/> ## The resolve conflicts on create for the EKS addon<br/> resolve_conflicts_on_create = optional(string, "NONE")<br/> ## The resolve conflicts on update for the EKS addon<br/> resolve_conflicts_on_update = optional(string, "OVERWRITE")<br/> ## The service account role ARN for the EKS addon<br/> service_account_role_arn = optional(string)<br/> ## The timeouts for the EKS addon<br/> timeouts = optional(object({<br/> ## The timeout for the EKS addon create<br/> create = optional(string)<br/> ## The timeout for the EKS addon update<br/> update = optional(string)<br/> ## The timeout for the EKS addon delete<br/> delete = optional(string)<br/> }), {})<br/> ## The tags for the EKS addon<br/> tags = optional(map(string), {})<br/> }))</pre> | `null` | no |
455456
| <a name="input_argocd"></a> [argocd](#input\_argocd) | The ArgoCD configuration | <pre>object({<br/> ## Indicates if we should enable the ArgoCD platform<br/> enabled = optional(bool, false)<br/> ## The namespace to deploy the ArgoCD platform to<br/> namespace = optional(string, "argocd")<br/> ## The service account to deploy the ArgoCD platform to<br/> service_account = optional(string, "argocd")<br/> })</pre> | `{}` | no |
456457
| <a name="input_aws_ack_iam"></a> [aws\_ack\_iam](#input\_aws\_ack\_iam) | The AWS ACK IAM configuration | <pre>object({<br/> ## Indicates if we should enable the AWS ACK IAM platform<br/> enabled = optional(bool, false)<br/> ## The namespace to deploy the AWS ACK IAM platform to<br/> namespace = optional(string, "ack-system")<br/> ## The service account to deploy the AWS ACK IAM platform to<br/> service_account = optional(string, "ack-iam-controller")<br/> ## Managed policies to attach to the AWS ACK IAM platform<br/> managed_policy_arns = optional(map(string), {})<br/> })</pre> | `{}` | no |
457458
| <a name="input_cert_manager"></a> [cert\_manager](#input\_cert\_manager) | The cert-manager configuration | <pre>object({<br/> ## Indicates if we should enable the cert-manager platform<br/> enabled = optional(bool, false)<br/> ## The namespace to deploy the cert-manager platform to<br/> namespace = optional(string, "cert-manager")<br/> ## The service account to deploy the cert-manager platform to<br/> service_account = optional(string, "cert-manager")<br/> ## Route53 zone id to use for the cert-manager platform<br/> hosted_zone_arns = optional(list(string), [])<br/> })</pre> | `{}` | no |
458459
| <a name="input_cloudwatch_observability"></a> [cloudwatch\_observability](#input\_cloudwatch\_observability) | The CloudWatch Observability configuration | <pre>object({<br/> ## Indicates if we should enable the CloudWatch Observability platform<br/> enabled = optional(bool, false)<br/> ## The namespace to deploy the CloudWatch Observability platform to<br/> namespace = optional(string, "cloudwatch-observability")<br/> ## The service account to deploy the CloudWatch Observability platform to<br/> service_account = optional(string, "cloudwatch-observability")<br/> })</pre> | `{}` | no |
459460
| <a name="input_cluster_enabled_log_types"></a> [cluster\_enabled\_log\_types](#input\_cluster\_enabled\_log\_types) | List of log types to enable for the EKS cluster. | `list(string)` | <pre>[<br/> "api",<br/> "audit",<br/> "authenticator",<br/> "controllerManager",<br/> "scheduler"<br/>]</pre> | no |
460461
| <a name="input_create_kms_key"></a> [create\_kms\_key](#input\_create\_kms\_key) | Whether to create a KMS key for the EKS cluster. | `bool` | `true` | no |
461-
| <a name="input_eks_addons"></a> [eks\_addons](#input\_eks\_addons) | Map of EKS addons to enable | <pre>map(object({<br/> ## The name of the EKS addon<br/> name = optional(string)<br/> ## Indicates if we should deploy the EKS addon before the compute nodes<br/> before_compute = optional(bool, false)<br/> ## Indicates if we should use the most recent version of the EKS addon<br/> most_recent = optional(bool, true)<br/> ## The version of the EKS addon<br/> addon_version = optional(string)<br/> ## The configuration values for the EKS addon<br/> configuration_values = optional(string)<br/> ## The pod identity association for the EKS addon<br/> pod_identity_association = optional(list(object({<br/> ## The role ARN for the EKS addon pod identity association<br/> role_arn = string<br/> ## The service account for the EKS addon<br/> service_account = string<br/> })))<br/> ## Indicates if we should preserve the EKS addon<br/> preserve = optional(bool, true)<br/> ## The resolve conflicts on create for the EKS addon<br/> resolve_conflicts_on_create = optional(string, "NONE")<br/> ## The resolve conflicts on update for the EKS addon<br/> resolve_conflicts_on_update = optional(string, "OVERWRITE")<br/> ## The service account role ARN for the EKS addon<br/> service_account_role_arn = optional(string)<br/> ## The timeouts for the EKS addon<br/> timeouts = optional(object({<br/> ## The timeout for the EKS addon create<br/> create = optional(string)<br/> ## The timeout for the EKS addon update<br/> update = optional(string)<br/> ## The timeout for the EKS addon delete<br/> delete = optional(string)<br/> }), {})<br/> ## The tags for the EKS addon<br/> tags = optional(map(string), {})<br/> }))</pre> | `null` | no |
462462
| <a name="input_enable_cluster_creator_admin_permissions"></a> [enable\_cluster\_creator\_admin\_permissions](#input\_enable\_cluster\_creator\_admin\_permissions) | Whether to enable cluster creator admin permissions (else create access entries for the cluster creator) | `bool` | `false` | no |
463463
| <a name="input_enable_irsa"></a> [enable\_irsa](#input\_enable\_irsa) | Whether to enable IRSA for the EKS cluster. | `bool` | `true` | no |
464464
| <a name="input_enable_private_access"></a> [enable\_private\_access](#input\_enable\_private\_access) | Whether to enable private access to the EKS API server endpoint. | `bool` | `true` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module "eks" {
1616
version = "21.4.0"
1717

1818
access_entries = local.access_entries
19-
addons = var.eks_addons
19+
addons = var.addons
2020
authentication_mode = "API"
2121
create_auto_mode_iam_resources = true
2222
create_kms_key = var.create_kms_key

variables.tf

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,49 @@ variable "access_entries" {
2121
default = null
2222
}
2323

24+
variable "addons" {
25+
description = "Map of EKS addons to enable"
26+
type = map(object({
27+
## The name of the EKS addon
28+
name = optional(string)
29+
## Indicates if we should deploy the EKS addon before the compute nodes
30+
before_compute = optional(bool, false)
31+
## Indicates if we should use the most recent version of the EKS addon
32+
most_recent = optional(bool, true)
33+
## The version of the EKS addon
34+
addon_version = optional(string)
35+
## The configuration values for the EKS addon
36+
configuration_values = optional(string)
37+
## The pod identity association for the EKS addon
38+
pod_identity_association = optional(list(object({
39+
## The role ARN for the EKS addon pod identity association
40+
role_arn = string
41+
## The service account for the EKS addon
42+
service_account = string
43+
})))
44+
## Indicates if we should preserve the EKS addon
45+
preserve = optional(bool, true)
46+
## The resolve conflicts on create for the EKS addon
47+
resolve_conflicts_on_create = optional(string, "NONE")
48+
## The resolve conflicts on update for the EKS addon
49+
resolve_conflicts_on_update = optional(string, "OVERWRITE")
50+
## The service account role ARN for the EKS addon
51+
service_account_role_arn = optional(string)
52+
## The timeouts for the EKS addon
53+
timeouts = optional(object({
54+
## The timeout for the EKS addon create
55+
create = optional(string)
56+
## The timeout for the EKS addon update
57+
update = optional(string)
58+
## The timeout for the EKS addon delete
59+
delete = optional(string)
60+
}), {})
61+
## The tags for the EKS addon
62+
tags = optional(map(string), {})
63+
}))
64+
default = null
65+
}
66+
2467
variable "pod_identity" {
2568
description = "The pod identity configuration"
2669
type = map(object({
@@ -133,49 +176,6 @@ variable "cluster_name" {
133176
type = string
134177
}
135178

136-
variable "eks_addons" {
137-
description = "Map of EKS addons to enable"
138-
type = map(object({
139-
## The name of the EKS addon
140-
name = optional(string)
141-
## Indicates if we should deploy the EKS addon before the compute nodes
142-
before_compute = optional(bool, false)
143-
## Indicates if we should use the most recent version of the EKS addon
144-
most_recent = optional(bool, true)
145-
## The version of the EKS addon
146-
addon_version = optional(string)
147-
## The configuration values for the EKS addon
148-
configuration_values = optional(string)
149-
## The pod identity association for the EKS addon
150-
pod_identity_association = optional(list(object({
151-
## The role ARN for the EKS addon pod identity association
152-
role_arn = string
153-
## The service account for the EKS addon
154-
service_account = string
155-
})))
156-
## Indicates if we should preserve the EKS addon
157-
preserve = optional(bool, true)
158-
## The resolve conflicts on create for the EKS addon
159-
resolve_conflicts_on_create = optional(string, "NONE")
160-
## The resolve conflicts on update for the EKS addon
161-
resolve_conflicts_on_update = optional(string, "OVERWRITE")
162-
## The service account role ARN for the EKS addon
163-
service_account_role_arn = optional(string)
164-
## The timeouts for the EKS addon
165-
timeouts = optional(object({
166-
## The timeout for the EKS addon create
167-
create = optional(string)
168-
## The timeout for the EKS addon update
169-
update = optional(string)
170-
## The timeout for the EKS addon delete
171-
delete = optional(string)
172-
}), {})
173-
## The tags for the EKS addon
174-
tags = optional(map(string), {})
175-
}))
176-
default = null
177-
}
178-
179179
variable "cluster_enabled_log_types" {
180180
description = "List of log types to enable for the EKS cluster."
181181
type = list(string)

0 commit comments

Comments
 (0)