Initial commit: Terraform configurations for multiple cloud providers
This commit is contained in:
26
oracle/us/README.md
Normal file
26
oracle/us/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Oracle Cloud 美国账号配置
|
||||
|
||||
## 配置说明
|
||||
此目录包含美国 Oracle Cloud 账号的 Terraform 配置。配置使用 `~/.oci/config` 文件中的 `[DEFAULT]` profile。
|
||||
|
||||
## 账号信息
|
||||
- **区域**: us-ashburn-1(弗吉尼亚)
|
||||
- **Profile**: DEFAULT
|
||||
- **密钥文件**: ~/.oci/oci_api_key.pem
|
||||
|
||||
## 使用方法
|
||||
```bash
|
||||
cd /home/ben/terraform/oracle/us
|
||||
terraform init
|
||||
terraform plan
|
||||
terraform apply
|
||||
```
|
||||
|
||||
## 环境配置
|
||||
如果需要多环境(dev/prod),可以考虑:
|
||||
1. 在此目录下创建 `environments/` 子目录
|
||||
2. 或者使用根目录的共享 `environments/` 和 `modules/` 目录
|
||||
|
||||
## 注意事项
|
||||
- 确保 `~/.oci/config` 中的 [DEFAULT] 配置正确
|
||||
- 美国区域的资源命名和合规要求可能与其他区域不同
|
||||
20
oracle/us/main.tf
Normal file
20
oracle/us/main.tf
Normal file
@@ -0,0 +1,20 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
oci = {
|
||||
source = "oracle/oci"
|
||||
version = ">= 4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "oci" {
|
||||
# 美国账号配置 - 使用 ~/.oci/config 中的 [DEFAULT] profile
|
||||
# config_file_profile = "DEFAULT" # 可选,DEFAULT 是默认值
|
||||
|
||||
# 或者,如果需要覆盖某些配置,可以显式指定:
|
||||
# tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaayyhuf6swf2ho4s5acdpee6zssst6j7nkiri4kyfdusxzn3e7p32q"
|
||||
# user_ocid = "ocid1.user.oc1..aaaaaaaappc7zxue4dlrsjljg4fwl6wcc5smetreuvpqn72heiyvjeeqanqq"
|
||||
# fingerprint = "36:2f:3e:19:fa:9e:bb:81:30:26:f2:d7:52:d4:1d:88"
|
||||
# private_key_path = "~/.oci/oci_api_key.pem"
|
||||
# region = "us-ashburn-1"
|
||||
}
|
||||
Reference in New Issue
Block a user