terraform-infrastructure

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Terraform Infrastructure Workflow

Terraform 基础设施工作流

Overview

概述

Specialized workflow for infrastructure as code using Terraform including resource provisioning, module creation, state management, and multi-environment deployments.
使用Terraform的专业化基础设施即代码工作流,包括资源配置、模块创建、状态管理和多环境部署。

When to Use This Workflow

何时使用此工作流

Use this workflow when:
  • Provisioning cloud infrastructure
  • Creating Terraform modules
  • Managing multi-environment infra
  • Implementing IaC best practices
  • Setting up Terraform workflows
在以下场景使用此工作流:
  • 配置云基础设施
  • 创建Terraform模块
  • 管理多环境基础设施
  • 实施IaC最佳实践
  • 搭建Terraform工作流

Workflow Phases

工作流阶段

Phase 1: Terraform Setup

阶段1:Terraform 初始化设置

Skills to Invoke

要调用的技能

  • terraform-skill
    - Terraform basics
  • terraform-specialist
    - Advanced Terraform
  • terraform-skill
    - Terraform 基础操作
  • terraform-specialist
    - Terraform 进阶操作

Actions

操作步骤

  1. Initialize Terraform
  2. Configure backend
  3. Set up providers
  4. Configure variables
  5. Create outputs
  1. 初始化Terraform
  2. 配置后端存储
  3. 设置云服务商
  4. 配置变量
  5. 创建输出项

Copy-Paste Prompts

可复制粘贴的提示语

Use @terraform-skill to set up Terraform project
Use @terraform-skill to set up Terraform project

Phase 2: Resource Provisioning

阶段2:资源配置

Skills to Invoke

要调用的技能

  • terraform-module-library
    - Terraform modules
  • cloud-architect
    - Cloud architecture
  • terraform-module-library
    - Terraform 模块库
  • cloud-architect
    - 云架构设计

Actions

操作步骤

  1. Design infrastructure
  2. Create resource definitions
  3. Configure networking
  4. Set up compute
  5. Add storage
  1. 设计基础设施架构
  2. 创建资源定义
  3. 配置网络
  4. 设置计算资源
  5. 添加存储资源

Copy-Paste Prompts

可复制粘贴的提示语

Use @terraform-module-library to provision cloud resources
Use @terraform-module-library to provision cloud resources

Phase 3: Module Creation

阶段3:模块创建

Skills to Invoke

要调用的技能

  • terraform-module-library
    - Module creation
  • terraform-module-library
    - 模块创建

Actions

操作步骤

  1. Design module interface
  2. Create module structure
  3. Define variables/outputs
  4. Add documentation
  5. Test module
  1. 设计模块接口
  2. 创建模块结构
  3. 定义变量/输出项
  4. 添加文档
  5. 测试模块

Copy-Paste Prompts

可复制粘贴的提示语

Use @terraform-module-library to create reusable Terraform module
Use @terraform-module-library to create reusable Terraform module

Phase 4: State Management

阶段4:状态管理

Skills to Invoke

要调用的技能

  • terraform-specialist
    - State management
  • terraform-specialist
    - 状态管理

Actions

操作步骤

  1. Configure remote backend
  2. Set up state locking
  3. Implement workspaces
  4. Configure state access
  5. Set up backup
  1. 配置远程后端
  2. 设置状态锁定
  3. 实现工作区
  4. 配置状态访问权限
  5. 设置备份机制

Copy-Paste Prompts

可复制粘贴的提示语

Use @terraform-specialist to configure Terraform state
Use @terraform-specialist to configure Terraform state

Phase 5: Multi-Environment

阶段5:多环境部署

Skills to Invoke

要调用的技能

  • terraform-specialist
    - Multi-environment
  • terraform-specialist
    - 多环境管理

Actions

操作步骤

  1. Design environment structure
  2. Create environment configs
  3. Set up variable files
  4. Configure isolation
  5. Test deployments
  1. 设计环境架构
  2. 创建环境配置
  3. 设置变量文件
  4. 配置环境隔离
  5. 测试部署流程

Copy-Paste Prompts

可复制粘贴的提示语

Use @terraform-specialist to set up multi-environment Terraform
Use @terraform-specialist to set up multi-environment Terraform

Phase 6: CI/CD Integration

阶段6:CI/CD 集成

Skills to Invoke

要调用的技能

  • cicd-automation-workflow-automate
    - CI/CD
  • github-actions-templates
    - GitHub Actions
  • cicd-automation-workflow-automate
    - CI/CD 自动化
  • github-actions-templates
    - GitHub Actions 模板

Actions

操作步骤

  1. Create CI pipeline
  2. Configure plan/apply
  3. Set up approvals
  4. Add validation
  5. Test pipeline
  1. 创建CI流水线
  2. 配置计划/应用流程
  3. 设置审批机制
  4. 添加验证步骤
  5. 测试流水线

Copy-Paste Prompts

可复制粘贴的提示语

Use @cicd-automation-workflow-automate to create Terraform CI/CD
Use @cicd-automation-workflow-automate to create Terraform CI/CD

Phase 7: Security

阶段7:安全配置

Skills to Invoke

要调用的技能

  • secrets-management
    - Secrets management
  • terraform-specialist
    - Security
  • secrets-management
    - 密钥管理
  • terraform-specialist
    - 安全配置

Actions

操作步骤

  1. Configure secrets
  2. Set up encryption
  3. Implement policies
  4. Add compliance
  5. Audit access
  1. 配置密钥
  2. 设置加密机制
  3. 实施安全策略
  4. 添加合规检查
  5. 审计访问权限

Copy-Paste Prompts

可复制粘贴的提示语

Use @secrets-management to secure Terraform secrets
Use @secrets-management to secure Terraform secrets

Quality Gates

质量检查项

  • Resources provisioned
  • Modules working
  • State configured
  • Multi-env tested
  • CI/CD working
  • Security verified
  • 资源已配置完成
  • 模块可正常工作
  • 状态已正确配置
  • 多环境已测试通过
  • CI/CD 流水线可正常运行
  • 安全配置已验证

Related Workflow Bundles

相关工作流包

  • cloud-devops
    - Cloud/DevOps
  • kubernetes-deployment
    - Kubernetes
  • aws-infrastructure
    - AWS specific
  • cloud-devops
    - 云原生/DevOps
  • kubernetes-deployment
    - Kubernetes 部署
  • aws-infrastructure
    - AWS 专属基础设施