Files
nexus/wiki/concepts/InfrastructureAsCode.md

34 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.
---
title: "Infrastructure as Code"
type: concept
tags:
- IaC
- DevOps
- Cloud
sources:
- ctp-topic-48-terraform-vs-terragrunt.md
- [[learning-sessions-cloud-transformation-programme-20230808-183322-meeting-recordi]]
last_updated: 2026-05-15
---
## Definition
Infrastructure as CodeIaC是通过代码定义和管理基础设施的实践实现基础设施的版本控制、自动化部署和一致性管理而非手动配置。
## Key Characteristics
- **声明式配置**:定义期望的最终状态,而非步骤
- **版本控制**:所有基础设施定义纳入 Git 管理
- **幂等性**:重复执行产生相同结果
- **自动化**:与 CI/CD 流程深度集成
## Core Tools
- [[Terraform]] — 云无关的 IaC 工具
- [[Terragrunt]] — Terraform 的 DRY 包装器
- AWS CloudFormation — AWS 原生 IaC
- Pulumi — 编程语言驱动的 IaC
- Ansible — 配置管理工具
## Connections
- [[Terraform]] ← implements ← [[InfrastructureAsCode]]
- [[Terragrunt]] ← extends ← [[Terraform]](多环境管理)
- [[Atlantis]] ← enables ← [[GitOps]]PR 驱动的 IaC 部署)