41 lines
1.6 KiB
Markdown
41 lines
1.6 KiB
Markdown
---
|
||
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 深度对比
|