Auto-sync: 2026-04-28 20:03

This commit is contained in:
2026-04-28 20:03:11 +08:00
parent c51cc4c58b
commit f71229f0c3
94 changed files with 2752 additions and 1295 deletions

View File

@@ -0,0 +1,40 @@
---
title: "TerraGrant"
type: entity
tags: [IaC, Terraform, AWS]
sources: [ctp-topic-7-saas-landing-zone-design]
last_updated: 2026-05-06
---
## TerraGrant (TerraGrunt)
Terraform 的轻量封装工具,用于简化跨账户 IaC 部署。TerraGrant 在 SAS Landing Zone 中用于管理 Terraform 状态和跨账户依赖。
## Relationship with Terraform
TerraGrant即 TerraGrunt是 HashiCorp Terraform 的封装工具wrapper非独立产品。
在 [[ctp-topic-7-saas-landing-zone-design]] 定义的 SAS LZ 中:
- **跨账户部署**TerraGrunt 简化 Terraform 状态管理和跨账户引用
- **与 Gruntwork 集成**SAS LZ 基于 Gruntwork 仓库TerraGrunt 用于管理跨环境Dev/Staging/Prod的 Terraform 配置
- **配合 Jenkins**GitHub Hook → Jenkins → TerraGrunt 命令执行部署
## Key Properties
- **Type**: IaC Tool (Terraform Wrapper)
- **Vendor**: Gruntwork (from Terragrunt)
- **Purpose**: DRY Terraform configurations, remote state management, cross-account deployments
- **In SAS LZ**: 每个账户拥有独立 GitHub 仓库管理 TerraGrunt 配置
## Relationship to Gruntwork
- [[Gruntwork]] 提供预构建的 Terraform 模块
- TerraGrunt 简化这些模块的跨账户使用
- 两者结合Gruntwork 模块 + TerraGrunt 封装 = SAS LZ IaC 实践
## Aliases
- TerraGrunt
- Terragrunt
## Connections
- [[ctp-topic-7-saas-landing-zone-design]] — SAS LZ 自动化部署工具链
- [[ctp-topic-1-gruntwork-landing-zone-architecture]] — Gruntwork 架构基础
- [[ctp-topic-48-terraform-vs-terragrunt]] — Terraform 与 TerraGrunt 深度对比