Terraform

An open-source infrastructure as code (IaC) tool by HashiCorp.

Terraform은 HashiCorp에서 개발한 오픈소스 Infrastructure as Code (IaC) 도구입니다. 사용자는 선언적 구성 언어(HCL - HashiCorp Configuration Language 또는 JSON)를 사용하여 인프라를 정의하고 프로비저닝할 수 있습니다. Terraform을 사용하면 여러 클라우드 제공업체(AWS, Azure, Google Cloud 등) 및 온프레미스 환경 전반에 걸쳐 인프라를 안전하고 효율적으로 구축, 변경 및 버전 관리할 수 있습니다. 핵심 워크플로우는 구성 파일을 작성하고, 변경 사항 실행을 계획하고, 해당 변경 사항을 적용하여 인프라 리소스를 생성하거나 업데이트하는 것을 포함합니다. Terraform은 관리되는 인프라의 현재 상태를 추적하는 state file을 유지 관리하여 점진적인 변경을 수행하고 drift를 감지할 수 있도록 합니다. 모듈성, 광범위한 provider 생태계, 다양한 플랫폼 전반에 걸쳐 일관된 워크플로우에 대한 집중은 복잡한 인프라 배포를 관리하고, 프로비저닝을 자동화하며, 인프라의 일관성과 반복성을 보장하는 강력한 도구로 만듭니다.

        graph LR
  Center["Terraform"]:::main
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 지식 테스트

1 / 4

🧒 5살도 이해할 수 있게 설명

Terraform은 클라우드에서 컴퓨터 시스템을 구축하기 위한 청사진과 같습니다. 원하는 것(서버, 데이터베이스, 네트워크 등)을 정확히 적어두면 Terraform이 자동으로 구축해주고 나중에 업데이트도 해줄 수 있습니다.

🤓 Expert Deep Dive

Terraform's declarative approach contrasts with imperative IaC tools by focusing on the desired end-state rather than the sequence of commands to achieve it. Its state management is crucial; the state file acts as a real-time mapping of configured resources to actual infrastructure objects. This state allows Terraform to perform diffing operations, identifying discrepancies between the configuration and the live environment for planning and applying changes. Providers are plugins that abstract the APIs of various cloud and service providers, enabling Terraform's multi-cloud capabilities. The execution plan generated before applying changes provides a critical safety net, detailing resource creation, modification, and destruction. Advanced features include modules for code reuse, workspaces for managing multiple environments, and a registry for sharing modules and providers.

📚 출처