This guide will help you to migrate your terraform code across versions. Keeping your terraform state to the latest version is always recommeneded
- Ensure that you are running on the latest version of 0.6.x
- Move to
0.7.0
and run the following commandterraform init -upgrade
- Run the migration script present in the
scripts/
directorybash migration-script-7.sh
- Run terraform plan to check if there are is diff
terraform plan
- Ensure you are running on the version 0.5.2
- Ensure that you runnning on the EKS version
1.30
which is the default version in0.5.2
-
Execute the terraform apply with version
0.6.1
. If it fails run the below command to import access entry for cluster creatorterragrunt import 'module.aws-eks-kubernetes-cluster.aws_eks_access_entry.this["cluster_creator"]' "$IAM_PRINCIPAL_ARN" terragrunt import 'module.aws-eks-kubernetes-cluster.aws_eks_access_policy_association.this["cluster_creator_admin"]' $CLUSTER_NAME#$IAM_PRINCIPAL_ARN#arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy
-
If you still face any issue, go ahead and delete the access entry created in the EKS console Access tab and then run
terraform apply