반응형 terraform8 Terraform으로 ArgoCD + GitHub Deploy Key 구성 시 SSH 인증 오류 해결기 목차 1. 환경 구성 개요Terraform으로 다음 리소스를 구성했습니다.ArgoCD (Helm Chart)GitHub Deploy Key 생성 (TLS provider)ArgoCD Repository Secret 생성 (SSH Private Key 저장)Application 리소스 생성 (kubernetes_manifest)변수 예시:git_repo_url = "git@github.com:smith/smith-test.git" git_repo_path = "argocd" git_target_revision = "main" argocd_app_namespace = "default"2. 발생한 오류2.1 ArgoCD Repository Secret 생성 시 SSH Agent 에러Error: POST htt.. 2025. 8. 8. AWS 콘솔에서 만든 CloudFront 배포를 Terraform으로 가져와 관리하는 방법 (terraform import) 목차 AWS에서 CloudFront 배포(Distribution)를 콘솔로 만들었지만, 나중에 코드 기반 관리(IaC)를 위해 Terraform으로 전환하고 싶을 때 어떻게 해야 할까요?이번 글에서는 Terraform의 import 기능을 통해 콘솔로 만든 CloudFront 리소스를 Terraform으로 상태 일치시켜 관리하는 전체 과정을 실습 기반으로 정리합니다.🎯 목표콘솔에서 만든 CloudFront 배포를 삭제하지 않고 Terraform으로 가져옴Terraform 상태(state)와 코드(.tf)를 일치시켜 안전하게 관리Terraformer 사용 시 주의점까지 포함✅ 전체 작업 흐름 요약 단계설명1최소한의 .tf 리소스 블록 작성2terraform import로 상태(state) 연결3terra.. 2025. 8. 7. [AWS EKS - terraform] "Container runtime network not ready" reason: NetworkPluginNotReady message: Network plugin returns error: cni plugin not initialized 에러 주요 원인과 Terraform 관점의 조치사항1. aws-auth ConfigMap 설정 누락EKS는 IAM 역할을 통해 kubelet이 클러스터에 join할 수 있도록 허용해야 합니다. 해당 설정이 빠지면 Node는 EKS Control Plane과 통신이 안 되어 CNI도 설치되지 않습니다.조치:Terraform에서 aws-auth ConfigMap 설정이 들어갔는지 확인해야 합니다.예시:resource "kubernetes_config_map_v1_data" "aws_auth" { metadata { name = "aws-auth" namespace = "kube-system" } data = { mapRoles = yamlencode([ { ro.. 2025. 7. 24. [aws eks terraform] Blocks of type "elastic_gpu_specifications" are not expected here. 에러 Terraform을 활용해 AWS EKS 클러스터를 구성하던 중 다음과 같은 에러를 마주쳤습니다:pgsql복사편집Error: Unsupported block type │ on .terraform\modules\eks\modules\eks-managed-node-group\main.tf line 136, in resource "aws_launch_template" "this": │ 136: dynamic "elastic_gpu_specifications" { │ │ Blocks of type "elastic_gpu_specifications" are not expected here.같은 형식의 에러가 elastic_inference_accelerator 블록에 대해서도 반복 발생했습니다.환경Terrafor.. 2025. 7. 24. [Terraform] aws eip 에러: Can't configure a value for "domain" terraform으로 eip생성하려고 공식문서에서 다음과 같이 입력하고 생성하였습니다. resource "aws_eip" "lb" { instance = aws_instance.web.id domain = "vpc" } 자동으로 이 값이 입력된다는 내용이네요 뭔가 싶어서 찾아보았습니다. (삭제하면 동작합니다.) vpc로 할당한다는 내용 이때까지만 해도 뭔 새로운 기능이 생겼나 싶었네요. https://awscli.amazonaws.com/v2/documentation/api/2.1.29/reference/ec2/allocate-address.html aws cli aws eip에 다음과 같이 할당하는 내용이 있어서 보았는데 EC2-classic 이라는 옵션이 따로 있더군요. 생각해보니 예전에 ec2가 업.. 2024. 1. 30. [Terraform]테라폼에서 terraformer로 import후 plan 시 에러: The state file could not be read: read terraform.tfstate: The process cannot access the file because another process has locked a portion of the file. terraformer로 import한 폴더에서 terraform plan을 하니 다음과 같은 에러가 발생했다. The state file could not be read: read terraform.tfstate: The process cannot access the file because another process has locked a portion of the file. 그래서 terraform state mv 로 tfstate 정보를 다른곳에 옮겨서 plan을 해보았더니 정상적으로 동작하였다. import한것은 plan을 막아 놓은건지 아니면 terraformer에서 사용하는 상태로 적용되어 프로세스가 남아있다고 그런건지 확실하지는 않다. 2023. 8. 3. Terraform 설치 설치방법(for windows) https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started Install Terraform | Terraform - HashiCorp Learn Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker container locally by following a quick-start tutorial to check that Terraform installed correctly. .. 2022. 10. 4. Terraform 설치(windows) chocolatey를 설치합니다. 방법은 전에 포스팅했던 걸 링크로 대체합니다. https://rainbound.tistory.com/entry/Window-chocolatey-%EC%84%A4%EC%B9%98 Window chocolatey 설치 패키지 관리자가 window에 있다고해서 설치함 사용하지 않으면 웹페이지에 들어가서 다운받고 환경설정을 해줘서 shell에서 사용할수 있게 설정해야하는데 패키지 관리자를 사용하면 관리자 명령 rainbound.tistory.com 웹에서 애플리케이션받아서 설치하는 방법이 있지만 경로 설정 및 환경설정이 귀찮으므로 cmd나 power shell로 설치해보겟습니다. 앱으로 하고 싶으신분은 아래 URL에서 받으시면 됩니다. https://www.terraform.i.. 2022. 8. 22. 이전 1 다음 반응형