본문 바로가기

Data/Data Engineering

[Terraform] EKS삭제 시 "aws_auth" 에러 해결방법

반응형

│ Error: Get "http://localhost/api/v1/namespaces/kube-system/configmaps/aws-auth": dial tcp [::1]:80: connect: connection refused
│
│   with module.eks.module.eks.kubernetes_config_map_v1_data.aws_auth[0],
│   on .terraform/modules/eks.eks/main.tf line 431, in resource "kubernetes_config_map_v1_data" "aws_auth":
│  431: resource "kubernetes_config_map_v1_data" "aws_auth" {

로컬에서 terrafrom을 활용하여 EKS를 삭제하려고 했지만, 위와같은 에러문이 발생하여 쉽게 삭제가 안되었다.

이럴때 아래의 명령어로 state를 삭제해준 이후에 terraform apply를 해주면된다.

terraform state rm module.eks.module.eks.kubernetes_config_map_v1_data.aws_auth

 

반응형