45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
---
|
||
title: "Terraform"
|
||
type: entity
|
||
tags: [Infrastructure, Cloud, DevOps]
|
||
sources: [engineering-devops-automator]
|
||
last_updated: 2026-05-01
|
||
---
|
||
|
||
# Terraform
|
||
|
||
## 基本信息
|
||
- **类型**:工具 / 基础设施即代码平台
|
||
- **开发商**:HashiCorp
|
||
- **官网**:https://www.terraform.io
|
||
|
||
## 定义
|
||
Terraform 是一种声明式基础设施即代码(Infrastructure as Code)工具,通过 HCL(HashiCorp Configuration Language)语言描述云资源,实现跨多云(AWS/GCP/Azure)的自动化基础设施管理。
|
||
|
||
## 核心特性
|
||
- **声明式配置**:描述期望的最终状态,而非操作步骤
|
||
- **执行计划**:在应用前预览变更内容
|
||
- **资源图谱**:构建所有资源的依赖关系图
|
||
- **状态管理**:跟踪已创建资源与实际基础设施的差异
|
||
- **多云支持**:统一管理 AWS/GCP/Azure 等多个云平台
|
||
|
||
## 在 DevOps Automator 中的角色
|
||
- 基础设施生命周期管理的核心工具
|
||
- 用于定义 AWS uto-scaling groups、ALB、CloudWatch alarms 等
|
||
- 通过 `terraform plan` 预览变更,通过 `terraform apply` 自动部署
|
||
|
||
## 相关概念
|
||
- [[Infrastructure as Code]]
|
||
- [[CI/CD Pipeline]]
|
||
- [[Kubernetes]]
|
||
|
||
## 相关工具
|
||
- Terragrunt(Terraform 包装器,支持远程状态和模块复用)
|
||
- Atlantis(Terraform CI/CD 自动化工具)
|
||
- tfsec(Terraform 安全扫描)
|
||
|
||
## Aliases
|
||
- Terraform
|
||
- Terraform IaC
|
||
- HashiCorp Terraform
|