A plan wants to replace an EKS cluster after changing `subnet_ids`.
AdvancedTroubleshootingPlan Errors and Unexpected Replacements
Answer
Likely causes → Depending on provider and API support, some vpc_config changes require a new cluster; a module upgrade may also change subnet ordering or the cluster name.
Diagnose → terraform plan | grep -B3 'forces replacement' inside module.eks.
Fix → Stop. Revert the change, or check whether AWS now allows updating it via aws eks update-cluster-config and wait for provider support. For real migrations, build a second cluster and migrate workloads (blue/green).
Prevent → Gate any plan containing delete on aws_eks_cluster, RDS, or other stateful/critical resources.
More on Plan Errors and Unexpected Replacements
`Error: Invalid for_each argument` — `The "for_each" map includes keys derived from resource attributes that cannot be determined until apply`.Intermediate`The given "for_each" argument value is unsuitable: the "for_each" argument must be a map, or set of strings, and you have provided a value of type list of string.`Beginner`Error: Invalid for_each argument` — `Sensitive values, or values derived from sensitive values, cannot be used as for_each arguments.`Intermediate`Error: Invalid count argument` — `The "count" value depends on resource attributes that cannot be determined until apply`.Intermediate`Error: Unsupported attribute` — `This object has no argument, nested block, or exported attribute named "public_ip_address"`.Beginner`Error: Unsupported attribute` on `module.vpc.private_subnets` — `This object does not have an attribute named "private_subnets"`.Beginner