1 feat: 重构基础设施架构并完善Consul集群配置
2
3 主要变更:
4 - 重构Terraform/OpenTofu目录结构,统一迁移至infrastructure/opentofu
5 - 添加"7天创造世界"文档,记录基础设施建设演进逻辑
6 - 更新Consul集群配置管理经验,添加实际案例和解决方案
7 - 修正README中的Sticky Note,反映Consul集群健康状态
8 - 添加Ansible部署配置和inventory文件
9 - 完善项目文档结构,添加各组件配置指南
10
11 技术架构演进:
12 - 第1天: Tailscale网络连接基础 ✅
13 - 第2天: Ansible分布式控制 ✅
14 - 第3天: Nomad服务感知与任务调度 ✅
15 - 第4天: Consul配置集中管理 ✅
16 - 第5天: OpenTofu状态一致性 ✅
17 - 第6天: Vault密钥管理 ⏳
18 - 第7天: Waypoint应用部署 ⏳
This commit is contained in:
25
infrastructure/opentofu/providers/digitalocean/main.tf
Normal file
25
infrastructure/opentofu/providers/digitalocean/main.tf
Normal file
@@ -0,0 +1,25 @@
|
||||
# DigitalOcean Provider 配置
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# DigitalOcean 提供者配置
|
||||
provider "digitalocean" {
|
||||
token = var.do_config.token
|
||||
}
|
||||
|
||||
# 创建 DigitalOcean Droplet 示例
|
||||
resource "digitalocean_droplet" "web" {
|
||||
image = "ubuntu-22-04-x64"
|
||||
name = "web-1"
|
||||
region = var.do_config.region
|
||||
size = "s-1vcpu-1gb"
|
||||
|
||||
tags = ["web", "mgmt"]
|
||||
}
|
||||
Reference in New Issue
Block a user