Files
terraform/README.md

41 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.
# 多云 Terraform 项目
这是一个用于管理多个云平台基础设施的 Terraform 项目。
## 项目结构
```
.
├── volcengine/ # 火山引擎(字节跳动)配置
├── oracle/ # Oracle Cloud甲骨文云配置
├── aws/ # Amazon Web Services 配置
└── modules/ # 共享模块
```
## 使用方法
### 1. 初始化特定云平台
```bash
cd volcengine
terraform init
```
### 2. 配置访问凭证
在每个云的 `main.tf` 文件中配置相应的访问凭证:
- **火山引擎**:需要 `access_key``secret_key``region`
- **Oracle Cloud**:需要 `tenancy_ocid``user_ocid``fingerprint``private_key_path``region`
- **AWS**:需要 `access_key``secret_key``region`
### 3. 规划和应用
```bash
terraform plan
terraform apply
```
## 注意事项
1. 每个云目录独立管理其 Terraform 状态
2. 共享模块放在 `modules/` 目录中
3. 敏感信息应使用环境变量或 Terraform 变量文件管理
4. 建议使用 `.gitignore` 排除 `.terraform` 目录和状态文件