====== Terraform ====== * https://www.terraform.io/ * Infrastructure As Code * 여러 클라우드 컴퓨팅 인프라스트럭처를 코드로 작성하고 한 번에 생성하고 삭제할 수 있는 등의 기능 제공. * [[aws:cloud_formation|AWS Cloud Formation]] 보다 더 좋은 평을 받고 있으며, 여러 클라우드 컴퓨팅을 지원한다. * [[https://hub.docker.com/r/hashicorp/terraform/|Terraform Docker]] * see [[devops:pulumi|pulumi]] ===== tfenv ===== * https://github.com/tfutils/tfenv * Terraform Version Manager * [[https://www.44bits.io/ko/post/managing-teraform-versions-with-tfenv|tfenv로 테라폼(Terraform) 버전 관리하기 | 44bits.io]] ===== terragrunt ===== * [[https://terragrunt.gruntwork.io/|Terragrunt | Terraform wrapper]] * https://github.com/gruntwork-io/terragrunt ===== terraform-switch ===== * https://tfswitch.warrensbox.com * https://github.com/warrensbox/terraform-switcher ==== 설치 ==== # tfenv install 시 권한때문에 local user 영역에 설치하는게 낫다. git clone https://github.com/tfutils/tfenv.git ~/.local/share/tfenv # PATH 에 ~/.local/share/tfenv/bin 추가하거나, # 혹은 ~/.local/share/tfenv/bin/* 파일들을 ~/.local/bin 에 symlink 한다. ln -s ~/.local/share/tfenv/bin/* ~/.local/bin ==== 사용 ==== # 버전 목록 보기 tfenv list-remote # 특정 버전 설치 tfenv install 0.12.9 # 최신 버전 설치 tfenv install latest # 0.12 버전대중에서 가장 최신 설치 tfenv install latest:^0.12 # 테라폼 파일 분석 후 그에 맞는 버전 설치 tfenv install min-required # .terraform-version에 지정된 버전 설치 tfenv install # 설치 목록 보기 tfenv list # 특정 버전 사용 tfenv use 0.12.9 # 프로젝트 디렉토리나 $HOME에 .terraform-version 파일에 버전을 넣어두면 해당 버전이 사용된다. # 혹은 latest 도 가능. echo '0.12.9' > .terraform-version terraform version # TFENV_TERRAFORM_VERSION 으로 .terraform-version 파일 오버라이드 가능 TFENV_TERRAFORM_VERSION=0.7.3 terraform version # 제거 tfenv uninstall # upgrade git --git-dir=~/.tfenv/.git pull ===== terraboard ===== * https://github.com/camptocamp/terraboard * terraform dashboard ===== 참조 ===== * [[http://woowabros.github.io/tools/2019/09/20/terraform.html|좌충우돌 Terraform 입문기 - 우아한형제들 기술 블로그]] * [[https://ryaneschinger.com/blog/aws-cloudformation-vs-terraform/|AWS CloudFormation vs Terraform · Ryan Eschinger Consulting]] * [[https://medium.com/@endofcake/terraform-vs-cloudformation-1d9716122623|Terraform vs CloudFormation – Alexander Savchuk]] * [[https://hackernoon.com/your-infrastructure-as-code-cloudformation-vs-terraform-34ec5fb5f044|Your Infrastructure as Code 🌩 CloudFormation Vs Terraform?]] * [[https://www.44bits.io/ko/post/terraform_introduction_infrastrucute_as_code|테라폼(Terraform) 기초 튜토리얼: AWS로 시작하는 Infrastructure as Code | 44BITS]] * [[https://www.44bits.io/ko/post/preview-new-feature-of-terraform-012-beta-1|테라폼(Terraform) 0.12 베타 1 출시 및 개선된 HCL 문법 살펴보기 | 44bits.io]] * [[https://blog.outsider.ne.kr/1461|Terraform 0.12로 테라폼 코드 업그레이드하기 :: Outsider's Dev Story]] * https://www.baeldung.com/terraform-intro * [[https://blog.programster.org/terraform-cheatsheet|Terraform Cheatsheet | Programster's Blog]] * [[https://blog.outsider.ne.kr/1524?utm_medium=feed|Terraform 0.14로 테라폼 코드 업그레이드하기 :: Outsider's Dev Story]] * [[https://www.youtube.com/watch?v=vwn77cUarTs&list=PL8HowI-L-3_9bkocmR3JahQ4Y-Pbqs2Nt|(1) Terraform Tutorial - YouTube]] * [[https://www.youtube.com/watch?v=9PTdO7DM6XQ|Terraform을 기반한 AWS 기반 대규모 마이크로서비스 인프라 운영 노하우 - 이용욱(삼성전자) - YouTube]] * [[https://upcloud.com/community/tutorials/get-started-terraform/|How to get started with Terraform - Tutorial - UpCloud]] * [[https://www.baeldung.com/ops/terraform-intro|Introduction to Terraform | Baeldung]] * [[https://www.bogotobogo.com/DevOps/Terraform/Terraform-Introduction-AWS-elb-nginx.php|Introduction to Terraform with AWS elb & nginx - 2020]] * [[https://www.bogotobogo.com/DevOps/Terraform/Terraform-creating-multiple-instances-count-list-type.php|Terraform Tutorial - creating multiple instances (count, list type and element() function) - 2020]] : 여러개의 동일한 형태의 EC2 인스턴스 생성하기 * [[https://blog.2dal.com/2017/10/29/aws-bastion-with-terraform-modules/|AWS Bastion with Terraform Modules | asbubam's blog on 2dal.com]] * [[https://dev.to/loujaybee/should-you-commit-the-terraform-tfstate-file-to-git-5054|Should You Commit the Terraform .tfstate File to Git? - DEV Community]] * [[https://youtu.be/SLB_c_ayRMo|Terraform Course - Automate your AWS cloud infrastructure]] 기초를 쉽게 잘 설명하는 동영상. terraform 0.12 * [[https://learn.hashicorp.com/tutorials/terraform/organize-configuration|Separate Development and Production Environments | Terraform - HashiCorp Learn]] * [[https://www.codurance.com/publications/2020/04/28/terraform-with-multiple-environments|Terraform With Multiple Environments | Codurance]] * [[https://www.terraform.io/docs/cloud/guides/recommended-practices/index.html|Index - Terraform Recommended Practices - Terraform by HashiCorp]] * [[https://www.terraform.io/language/modules|Terraform Module Testing with LocalStack and GitHub Actions - DEV Community]] * [[https://www.timescale.com/blog/terraform-providers-a-beginners-guide/|Terraform Providers: A Beginner's Guide]]