웹서버를 구축하려면 어떤 과정을 거치는가? 인스턴스를 만들고, 보안 그룹을 설정하고, 로드밸런서를 붙이고, 데이터베이스를 연결한다. 이걸 콘솔에서 클릭으로 하면 한 번에 몇 시간이 걸린다. 그리고 다음에 또 해야 하면 처음부터 다시 클릭이다. 실수도 하기 쉽다. 이 지루한 반복 작업을 코드로 자동화할 수 있다면?
인도네시아 Format: Jurnal Ilmiah Teknik Informatika에 발표된 연구는 Terraform을 활용한 Infrastructure as Code(IaC) 방식으로 클라우드 웹서버를 자동 구축하는 방법을 제시한다. 코드로 인프라를 정의하고, 한 번의 실행으로 전체 환경을 구축하는 접근이다.
연구는 웹서버 인프라의 각 구성 요소—네트워크, 컴퓨팅, 스토리지, 보안—를 Terraform 코드로 정의하는 방법을 단계별로 보여준다. 코드는 선언적이어서 "어떻게"가 아니라 "무엇을" 원하는지 기술하면 Terraform이 알아서 프로비저닝한다.
핵심 결과를 보면, IaC 방식은 수동 구축 대비 인프라 구축 시간을 80% 이상 단축했다. 클릭 기반 구축에 3-4시간이 걸리던 작업이 Terraform 실행으로 30분 이내에 완료되었다. 더 중요한 건 일관성이다. 같은 코드를 실행하면 항상 동일한 인프라가 구축되므로 환경 간 불일치 문제가 사라진다. 코드를 버전 관리하면 인프라 변경 이력도 추적할 수 있다. 변경이 필요하면 코드를 수정하고 다시 적용하면 되므로, 드리프트(실제 인프라가 코드와 다르게 변하는 현상)도 방지된다.
이 연구의 의미는 인프라 관리를 코드 개발처럼 할 수 있다는 것이다. 코드 리뷰, 버전 관리, CI/CD 파이프라인을 인프라에도 적용할 수 있다. 이건 단순한 편의성을 넘어 인프라 관리의 품질과 재현성을 근본적으로 높이는 전환이다.
한계로는 단순한 웹서버 구축에 국한되어 복잡한 마이크로서비스나 멀티 클러스터 환경에서의 검증이 부족하고, Terraform 상태 관리와 팀 협업에서의 과제—상태 파일 잠금, 민감 정보 관리—는 다루지 않았다.
클라우드 인프라를 수동으로 관리 중이라면 Terraform부터 시작하라. 가장 간단한 리소스—VPC 하나, 서버 하나—를 코드로 정의하는 것부터 시작해도 된다. 코드를 Git에 저장하고, 변경 시 pull request로 리뷰하는 프로세스를 만들면 인프라 관리의 품질이 눈에 띄게 올라간다. 점진적으로 더 복잡한 리소스를 코드로 옮겨가면 된다.
📖 *Implementasi Web Server Menggunakan Infrastructure As Code Terraform Berbasis Cloud Computing* |
논문 원문
※ 이 기사는 학술 논문을 바탕으로 작성되었습니다. 실제 적용 시 환경에 따라 다를 수 있으니 전문가와 상담하세요.
What process does it take to build a web server? You create an instance, configure security groups, attach a load balancer, and connect a database. Doing this via console clicks takes several hours at a time. And if you need to do it again next time, you have to click from the very beginning. It is also prone to human error. What if you could automate this tedious, repetitive task with code?
A study published in the Indonesian journal *Jurnal Ilmiah Teknik Informatika* presents a method for automatically provisioning cloud web servers using Infrastructure as Code (IaC) with Terraform. It is an approach where you define infrastructure as code and build the entire environment with a single execution.
The research demonstrates step-by-step how to define each component of a web server infrastructure—network, compute, storage, and security—using Terraform code. The code is declarative, meaning you describe "what" you want rather than "how" to do it, and Terraform handles the provisioning automatically.
Looking at the key results, the IaC approach reduced infrastructure provisioning time by over 80% compared to manual setup. Tasks that took 3-4 hours with click-based provisioning were completed in under 30 minutes via Terraform execution. More importantly, it ensures consistency. Running the same code always provisions identical infrastructure, eliminating the problem of environment inconsistencies. By version-controlling the code, you can also track the history of infrastructure changes. If changes are needed, you simply modify the code and reapply it, which also prevents configuration drift (the phenomenon where the actual infrastructure deviates from the code).
The significance of this study is that it enables infrastructure management to be handled just like software development. Code reviews, version control, and CI/CD pipelines can be applied to infrastructure as well. This is a shift that fundamentally improves the quality and reproducibility of infrastructure management, going beyond mere convenience.
As for limitations, the study is confined to simple web server provisioning, lacking validation in complex microservices or multi-cluster environments. It also does not address Terraform state management and team collaboration challenges, such as state file locking and sensitive data management.
If you are currently managing your cloud infrastructure manually, start with Terraform. You can begin by defining the simplest resources—a single VPC, a single server—as code. By storing the code in Git and creating a process to review changes via pull requests, the quality of your infrastructure management will noticeably improve. You can then gradually migrate more complex resources to code.
📖 *Implementasi Web Server Menggunakan Infrastructure As Code Terraform Berbasis Cloud Computing* | Original Paper
※ This article is based on an academic paper. Actual results may vary depending on the environment, so please consult with an expert.