Files
nexus/wiki/concepts/Infrastructure-as-Code.md
2026-04-21 04:02:47 +08:00

1.1 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Infrastructure as Code (IaC) concept
infrastructure
devops
automation
2026-04-21

Definition

Infrastructure as Code基础设施即代码是一种通过代码实现基础设施管理的方法论替代传统手动配置实现一致性、版本控制和自动化部署。

Core Principles

  • 声明式配置:定义期望状态而非步骤
  • 版本控制:所有基础设施变更通过 Git 管理
  • 自动化部署:通过 CI/CD 流水线实现一键部署
  • 幂等性:重复执行结果一致

Key Tools

  • TerraformHashiCorp 开发的跨平台 IaC 工具
  • TerragruntTerraform 包装工具,提供模块化和变量共享
  • CloudFormationAWS 原生 IaC 服务

Application

The Agency 项目中的 Support Infrastructure Maintainer 使用 Terraform 实现 AWS 基础设施声明式管理,包括 VPC、子网、Auto Scaling Group、RDS 等资源。