diff --git a/README.md b/README.md index f2161b1..f3d5328 100644 --- a/README.md +++ b/README.md @@ -462,6 +462,7 @@ Available targets: | [cluster\_encryption\_config\_provider\_key\_alias](#output\_cluster\_encryption\_config\_provider\_key\_alias) | Cluster Encryption Config KMS Key Alias ARN | | [cluster\_encryption\_config\_provider\_key\_arn](#output\_cluster\_encryption\_config\_provider\_key\_arn) | Cluster Encryption Config KMS Key ARN | | [cluster\_encryption\_config\_resources](#output\_cluster\_encryption\_config\_resources) | Cluster Encryption Config Resources | +| [eks\_addons\_versions](#output\_eks\_addons\_versions) | Map of enabled EKS Addons names and versions | | [eks\_cluster\_arn](#output\_eks\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster | | [eks\_cluster\_certificate\_authority\_data](#output\_eks\_cluster\_certificate\_authority\_data) | The Kubernetes cluster certificate authority data | | [eks\_cluster\_endpoint](#output\_eks\_cluster\_endpoint) | The endpoint for the Kubernetes API server | diff --git a/docs/terraform.md b/docs/terraform.md index d70b365..77f4172 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -118,6 +118,7 @@ | [cluster\_encryption\_config\_provider\_key\_alias](#output\_cluster\_encryption\_config\_provider\_key\_alias) | Cluster Encryption Config KMS Key Alias ARN | | [cluster\_encryption\_config\_provider\_key\_arn](#output\_cluster\_encryption\_config\_provider\_key\_arn) | Cluster Encryption Config KMS Key ARN | | [cluster\_encryption\_config\_resources](#output\_cluster\_encryption\_config\_resources) | Cluster Encryption Config Resources | +| [eks\_addons\_versions](#output\_eks\_addons\_versions) | Map of enabled EKS Addons names and versions | | [eks\_cluster\_arn](#output\_eks\_cluster\_arn) | The Amazon Resource Name (ARN) of the cluster | | [eks\_cluster\_certificate\_authority\_data](#output\_eks\_cluster\_certificate\_authority\_data) | The Kubernetes cluster certificate authority data | | [eks\_cluster\_endpoint](#output\_eks\_cluster\_endpoint) | The endpoint for the Kubernetes API server | diff --git a/outputs.tf b/outputs.tf index c1fb017..256b162 100644 --- a/outputs.tf +++ b/outputs.tf @@ -54,6 +54,14 @@ output "eks_cluster_ipv6_service_cidr" { value = one(aws_eks_cluster.default[*].kubernetes_network_config[0].service_ipv6_cidr) } +output "eks_addons_versions" { + description = "Map of enabled EKS Addons names and versions" + value = local.enabled ? { + for addon in aws_eks_addon.cluster : + addon.addon_name => addon.addon_version + } : {} +} + output "cluster_encryption_config_enabled" { description = "If true, Cluster Encryption Configuration is enabled" value = var.cluster_encryption_config_enabled