feat: add cloudflare workers ai config and global credentials

This commit is contained in:
Ben User
2026-02-01 11:22:52 +00:00
parent 70f160b396
commit b9e7cccaaf
35 changed files with 1806 additions and 10 deletions

67
oracle/kr/DEMO_OUTPUT.md Normal file
View File

@@ -0,0 +1,67 @@
# Oracle 云存储卷重新分配演示
## 预期的 Terraform 计划输出
当我们执行 `terraform plan -var ch2_enabled=false -var a1_storage_size_gb=200` 时,预期的输出将是:
```
Terraform will perform the following actions:
# oci_core_instance.ch2_instance[0] will be destroyed
- resource "oci_core_instance" "ch2_instance" {
- availability_domain = "..." -> null
- compartment_id = "..." -> null
- display_name = "ch2-instance" -> null
- id = "..." -> null
- shape = "VM.Standard2.1" -> null
# ... 其他实例属性
}
# oci_core_volume.a1_additional_storage will be created
+ resource "oci_core_volume" "a1_additional_storage" {
+ availability_domain = (known after apply)
+ compartment_id = "..."
+ display_name = "a1-additional-storage"
+ id = (known after apply)
+ size_in_gbs = 200
}
# oci_core_volume_attachment.a1_volume_attachment will be created
+ resource "oci_core_volume_attachment" "a1_volume_attachment" {
+ attachment_type = "paravirtualized"
+ id = (known after apply)
+ instance_id = (known after apply)
+ volume_id = (known after apply)
}
Plan: 2 to add, 0 to change, 1 to destroy.
```
## 存储卷重新分配流程
1. **终止 ch2 实例** - 释放其所有关联资源(包括引导卷和数据卷)
2. **创建新的 200GB 数据卷** - 为 A1 实例提供额外存储
3. **附加新卷到 A1 实例** - 将新存储空间挂载到目标实例
## 实际执行步骤
在实际环境中,你需要:
1. 确保 ~/.oci/config 文件中有正确的 [korea] 配置
2. 运行 `terraform init` 下载 OCI provider
3. 运行 `terraform plan -var ch2_enabled=false -var a1_storage_size_gb=200` 查看计划
4. 确认计划无误后运行 `terraform apply -var ch2_enabled=false -var a1_storage_size_gb=200`
## 预期结果
- ch2 实例被完全终止,释放其存储资源
- A1 实例获得新的 200GB 数据卷
- ch3 实例保持不变
- 总体资源得到优化配置
## 验证步骤
完成后,你可以在 Oracle 云控制台中验证:
- ch2 实例不再存在
- A1 实例有新的 200GB 数据卷附加
- 存储卷的成本已从 ch2 转移到 A1