1. 사전 준비
-
Kakao Cloud 콘솔에서 리소스 생성
- 프로젝트, VPC, Key Pair, Application Credential
-
Terraform 설치
brew install terraform2. 설정 파일 구성
git clone https://github.com/KEA-ChunSam/PlayUs-terraform.git
cd PlayUs-terraform
cp terraform.tfvars.example terraform.tfvars
# terraform.tfvars 파일을 환경에 맞게 수정3. 인프라 배포
terraform init # 초기화
terraform plan # 배포 계획 확인
terraform apply # 실제 인프라 생성4. 배포 결과 확인
terraform output # Floating IP, VIP 등 출력 확인5. 리소스 삭제
# 전체 인프라 삭제
terraform destroy
# 특정 리소스만 삭제
terraform destroy -target=resource_type.resource_name
