Files
nexus/wiki/concepts/TerraGrunt.md
2026-04-18 17:09:43 +08:00

48 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: TerraGrunt
title: "TerraGrunt"
type: concept
tags:
- DevOps
- IaC
- Terraform
- AWS
last_updated: 2026-04-18
---
## Aliases
- Terragrunt
## Summary
- **定义**Terraform 的包装工具,提供模块化、变量共享和环境隔离
- **用途**:管理多环境、多账户的 Terraform 配置
- **云迁移价值**:简化 Landing Zone 多账户部署
## Key Details
- **核心功能**
- 远程状态存储配置
- 模块化配置复用
- 多环境/多账户管理
- 自动输入变量传递
- **工作目录结构**
```
live/
├── prod/
│ └── terragrunt.hcl
├── staging/
│ └── terragrunt.hcl
└── dev/
└── terragrunt.hcl
```
- **与 Terraform 关系**
- TerraGrunt 调用 Terraform
- 纯 Terraform 包装,不替代
## Octane Hub 案例
- Octane Hub 使用 TerraGrunt 部署 AWS 基础设施
- 从手动脚本演进到 IaC 流程
## Connections
- [[Terraform]] ← wrapped_by ← [[TerraGrunt]]
- [[Infrastructure-as-Code-IaC]] ← implementd_by ← [[TerraGrunt]]
- [[Multi-Account-Strategy]] ← managed_by ← [[TerraGrunt]]