diff --git a/README.md b/README.md
index 5a074b966d..e94f11c349 100644
--- a/README.md
+++ b/README.md
@@ -279,6 +279,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
| [create\_node\_security\_group](#input\_create\_node\_security\_group) | Determines whether to create a security group for the node groups or use the existing `node_security_group_id` | `bool` | `true` | no |
| [custom\_oidc\_thumbprints](#input\_custom\_oidc\_thumbprints) | Additional list of server certificate thumbprints for the OpenID Connect (OIDC) identity provider's server certificate(s) | `list(string)` | `[]` | no |
| [dataplane\_wait\_duration](#input\_dataplane\_wait\_duration) | Duration to wait after the EKS cluster has become active before creating the dataplane components (EKS managed node group(s), self-managed node group(s), Fargate profile(s)) | `string` | `"30s"` | no |
+| [disable\_dynamic\_outputs](#input\_disable\_dynamic\_outputs) | Disable outputs for resource attributes that AWS can modify, preventing state drift | `bool` | `false` | no |
| [eks\_managed\_node\_group\_defaults](#input\_eks\_managed\_node\_group\_defaults) | Map of EKS managed node group default configurations | `any` | `{}` | no |
| [eks\_managed\_node\_groups](#input\_eks\_managed\_node\_groups) | Map of EKS managed node group definitions to create | `any` | `{}` | no |
| [enable\_cluster\_creator\_admin\_permissions](#input\_enable\_cluster\_creator\_admin\_permissions) | Indicates whether or not to add the cluster creator (the identity used by Terraform) as an administrator via access entry | `bool` | `false` | no |
diff --git a/outputs.tf b/outputs.tf
index 0bd2d10f4e..4f86965667 100644
--- a/outputs.tf
+++ b/outputs.tf
@@ -68,7 +68,7 @@ output "cluster_version" {
output "cluster_platform_version" {
description = "Platform version for the cluster"
- value = try(aws_eks_cluster.this[0].platform_version, null)
+ value = var.disable_dynamic_outputs ? null : try(aws_eks_cluster.this[0].platform_version, null)
}
output "cluster_status" {
@@ -196,7 +196,7 @@ output "cluster_iam_role_unique_id" {
output "cluster_addons" {
description = "Map of attribute maps for all EKS cluster addons enabled"
- value = merge(aws_eks_addon.this, aws_eks_addon.before_compute)
+ value = var.disable_dynamic_outputs ? null : merge(aws_eks_addon.this, aws_eks_addon.before_compute)
}
################################################################################
diff --git a/variables.tf b/variables.tf
index 7a7226b96a..da2085be77 100644
--- a/variables.tf
+++ b/variables.tf
@@ -16,6 +16,12 @@ variable "prefix_separator" {
default = "-"
}
+variable "disable_dynamic_outputs" {
+ description = "Disable outputs for resource attributes that AWS can modify, preventing state drift"
+ type = bool
+ default = false
+}
+
################################################################################
# Cluster
################################################################################