Nitin
08/01/2025, 10:43 AMeks-ops which provisions the EKS cluster and its associated components. Over time, the name eks-ops has caused some confusion—especially with regard to associating it with an "ops" AWS account, even though it’s used for all our environments, including dev.
Now that we’re still early in our rollout (with only dev environments deployed), I’d like to take the opportunity to rename the component from eks-ops to simply eks, which is more intuitive and aligned with the standard naming convention.
Here’s what I’ve done so far:
1. Created a copy of the catalog/eks-ops folder and renamed it to catalog/eks, cleaning up all eks-ops references in the manifest YAMLs.
2. Followed the Atmos component migration tutorial to migrate Terraform state from the old component name to the new one.
Steps taken:
cd components/terraform/eks/cluster/
terraform init
terraform workspace list
terraform workspace new plat-use1-dev-eks-cluster
terraform workspace select plat-use1-dev-eks-cluster
terraform state pull > plat-use1-dev-eks.tfstate
terraform state push plat-use1-dev-eks.tfstate
Additionally, I compared the state between the two workspaces:
terraform workspace select plat-use1-dev-eks-cluster
terraform state list
terraform workspace select plat-use1-dev-eks-cluster-ops
terraform state list
The resource lists in both workspaces are identical, confirming no drift.
However, when I run:
atmos terraform plan eks/cluster --stack plat-use1-dev
The plan still shows all 54 EKS-related resources as if they are going to be recreated.
My Question:
Is there a supported way to change a catalog component name (in this case, from eks-ops to eks) in Atmos without causing Terraform to interpret it as a new component and attempt to recreate all the associated infrastructure?
I'm assuming this has something to do with the backend configuration or how the component identity is derived, but I couldn’t find specific guidance on how to remap the state to avoid a full re-creation.
Any insight into what I might be missing—or a recommended process to cleanly rename components without destroying and recreating resources—would be greatly appreciated.Andriy Knysh (Cloud Posse)
08/01/2025, 2:52 PMterraform_workspace (https://atmos.tools/core-concepts/components/terraform/workspaces)
• workspace_key_prefix (https://atmos.tools/core-concepts/components/terraform/backends/#aws-s3-backend)Andriy Knysh (Cloud Posse)
08/01/2025, 2:53 PMeks-ops in a stack use1-dev, Atmos/Terraform do the following:Andriy Knysh (Cloud Posse)
08/01/2025, 2:55 PMworkspace_key_prefix, the component name is used automatically (unless you override it by manually specifying workspace_key_prefix for the component. In your case, eks-ops were used
• for terraform_workspace, the stack name is used automatically (unless you override it https://atmos.tools/core-concepts/components/terraform/workspaces#terraform-workspace-override-in-atmos), in your case it's use1-devAndriy Knysh (Cloud Posse)
08/01/2025, 2:57 PMeks-ops to eks), you can:
• Move the TF state from one backend location to the other (as you did above)
• Or, rename the component and configure it to keep the same workspace_key_prefix (so terraform will not attempt to move the state and will use the existing one)Andriy Knysh (Cloud Posse)
08/01/2025, 2:58 PMAndriy Knysh (Cloud Posse)
08/01/2025, 3:00 PMcomponents:
terraform:
eks:
metadata:
component: eks/cluster
# Override Terraform workspace using the pattern
terraform_workspace_pattern: "{environment}-{stage}-eks-ops"Andriy Knysh (Cloud Posse)
08/01/2025, 3:03 PMworkspace_key_prefix for the component
(The workspace_key_prefix in the Terraform S3 backend configuration is an optional parameter that defines a prefix applied to the state file keys within the S3 bucket when using Terraform workspaces)
s3://my-terraform-state-bucket/<workspace_key_prefix/workspace/terraform.tfstate
components:
terraform:
eks:
backend:
s3:
workspace_key_prefix: eks-opsAndriy Knysh (Cloud Posse)
08/01/2025, 3:03 PMAndriy Knysh (Cloud Posse)
08/01/2025, 3:04 PMcomponents:
terraform:
eks:
metadata:
component: eks/cluster
# Override Terraform workspace using the pattern
terraform_workspace_pattern: "{environment}-{stage}-eks-ops"
backend:
s3:
workspace_key_prefix: eks-opsAndriy Knysh (Cloud Posse)
08/01/2025, 3:04 PMNitin
08/11/2025, 12:18 PM