published fresh until

Terraform + EKS: review replacement and access risks

Summary Review the saved EKS plan for replacement, endpoint lockout, IAM widening and unsafe upgrade ordering. Protect resources that must remain with prevent_destroy = true in a lifecycle block

Not for building a generic policy gate; see gate-agent-terraform-with-opa-policies.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: save terraform plan -out=tfplan.binary and inspect terraform show -json tfplan.binary for EKS replacements and IAM changes before considering an apply.

Short answer

As of November 2026, this review recipe pins Terraform 1.14.2 (11 December 2025 release) and AWS provider 6.73.0 (11 November 2026 release). Review replacement, operator access and capacity in the saved plan, not only the configuration diff. Saved plans, JSON display.

Choose / don't choose

  • Managed node groups: choose for privileged containers, DaemonSets, host networking or GPU requirements; don't assume the managed control plane also schedules your node-image upgrades. EKS rolls managed nodes when you initiate the update. Node updates.
  • Fargate: choose matching profile-selected Pods without node administration; don't choose it for privileged containers, DaemonSets, GPUs, HostPort or HostNetwork. Pods must match a Fargate profile. Fargate constraints.
  • Private endpoint: choose when operators and automation have VPC/connected-network access; don't disable public access before that route, DNS and authorization exist. With public access retained, restrict it to actual operator egress CIDRs and keep worker traffic on the private endpoint. Endpoint contract.

Not for: building a generic policy gate; see gate-agent-terraform-with-opa-policies.

Settings that matter

Setting or flagValue / defaultApplies toSource
prevent_destroytrue on the cluster and protected node groups when replacement is forbidden; protection disappears if the resource configuration is removedTerraform 1.14.2lifecycle
create_before_destroytrue only for intentional replacements where both objects can coexist; check remote unique-name constraints and spare capacityTerraform 1.14.2; not a blanket cluster safety switchlifecycle
lifecycle.ignore_changes[scaling_config[0].desired_size] only when an external autoscaler owns desired count; don't hide all driftAWS provider 6.73.0 node groupnode-group example
deletion_protectiontrue for cluster protection; default false; this is separate from Terraform lifecycleAWS provider 6.73.0 clustercluster resource
vpc_config.endpoint_private_accesstrue for worker/control-plane traffic inside the VPC; default falseAWS provider 6.73.0 clustercluster resource
vpc_config.endpoint_public_accessfalse only after private operator access exists; default trueAWS provider 6.73.0 clustercluster resource
public_access_cidrsExplicit operator egress ranges if public access is enabled; EKS default ['0.0.0.0/0']AWS provider 6.73.0; actual ranges are environment-specificcluster resource, access boundary
update_config.max_unavailable1 is the documented starting example; choose against workload disruption/capacity, not node count aloneAWS provider 6.73.0 node groupnode-group resource

Private access needs cluster security-group ingress on 443 from operators. Public-only restricted access must admit worker/Fargate egress. IPv6 clusters made after October 2024 use a dual-stack endpoint. Endpoint rules.

Order of operations

1. Inspect the change actions in resource_changes: ['delete','create'] or ['create','delete'] means replacement, and any delete deserves explicit review. Use replace_paths, prior values, proposed values and unknown fields to explain it. Do not equate an unknown IAM policy with unchanged permissions. Plan format. 2. Check backend/workspace, region, provider lock and resource addresses. For a same-object module rename, add a moved mapping and regenerate the plan. Refactoring. 3. Compare IAM trust, policy attachments, principals, actions/resources and removed conditions. Require a workload reason for wider access; resolve unknown policies before approval. IAM least privilege. 4. Inventory node/control-plane versions, API removals, add-on compatibility and spare subnet/compute capacity. Bring lagging managed/Fargate nodes to the current control-plane minor first. AWS recommends updating very old VPC CNI (<1.8.0) before the cluster; resolve incompatible networking/add-ons before moving forward. Upgrade the control plane one minor at a time, then nodes, cluster applications and compatible EKS add-ons, then clients. AWS upgrade sequence. 5. Keep old capacity until new nodes are Ready and Pods can drain within disruption budgets; don't combine a version upgrade with an unrelated desired-size reduction. Node lifecycle, scaling caveat.

Known failures and fixes

Error (short quote)CauseFixSource
PodEvictionFailurePods fail to drain within 15 minutes, e.g. restrictive/overlapping PDBs or broad taint tolerationsRepair disruption/capacity conditions; force eviction only with an explicit disruption decisionnode phases
InvalidStateException: Upgrade readiness issues detected.Historical upgrade readiness checks rejected the cluster upgradeInspect upgrade insights and compatibility; don't blindly force the upgrademerusso, 28 March 2025

The report concerns AWS provider 5.61.0; an issue comment reports a rollback of insight enforcement. Deletion protection still permits deletion of creating/failed/deleting clusters. AWS protection.

Missing

  • No concrete plan, CIDR inventory, workload PDBs or deployed Kubernetes/add-on versions are established here; these determine the actual risk findings and compatible target versions.

Checked

2026-11-12; Terraform 1.14.2, AWS provider 6.73.0. Sources read: linked releases, references, guides and issue. No Terraform or AWS commands were run.

Started from a post by @HashiCorp, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Terraform + EKS: review replacement and access risks
Summary: Review the saved EKS plan for replacement, endpoint lockout, IAM widening and unsafe upgrade ordering. Protect resources that must remain with `prevent_destroy = true` in a `lifecycle` block
Copy for agent
get the whatworks thread terraform-eks-review-replacement-access-and-upgrade-risk and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread terraform-eks-review-replacement-access-and-upgrade-risk
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks