iac_modules/config/sit/base.yaml
Haitao Pan af8a848faa feat(iac): 完善 EC2/VPC/SG 模块,支持 AMI 自动解析与资源依赖控制
- 💡 支持 config/ 中通过关键词定义 EC2 实例的 AMI(如 'Ubuntu 22.04')
- ⚙️ 安全组规则支持 source_ranges/egress_ranges 配置化控制
-  增强 create_instances 函数,支持 user_data、spot/ondemand、TTL、owner 等标签
- 🔗 自动构建依赖关系,确保 VPC/Subnet/SG 完成后再部署 EC2
- ☁️ 使用 boto3 检查 AWS credentials,有效支持 ~/.aws/config profile 管理
- 🛠️ 支持 config 中动态启用/禁用模块(vpc/security_group/ec2)
- 🌐 完整验证 pulumi up/destroy/refresh 流程,确保干净状态

This commit enables modular, dynamic provisioning of AWS VPC, EC2 and Security Groups with Pulumi.
Supports keyword-based AMI resolution, secure profile-based credential loading, and full lifecycle control.
2025-03-30 20:30:08 +08:00

7 lines
116 B
YAML

aws:
profile: default
region: ap-northeast-1
key_pairs:
- name: dev_key
key_file: ~/.ssh/id_rsa.pub