Initial commit: Terraform configurations for multiple cloud providers

This commit is contained in:
Ben User
2026-02-01 06:36:02 +00:00
commit 70f160b396
58 changed files with 1813 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Oracle 计算实例模块示例
# 这是一个示例,实际使用时需要替换为真实的 OCI 资源
resource "null_resource" "compute_example" {
triggers = {
compartment_id = var.compartment_id
instance_name = var.instance_name
shape = var.shape
}
provisioner "local-exec" {
command = "echo '创建计算实例: ${var.instance_name},规格: ${var.shape},在 Compartment: ${var.compartment_id}'"
}
}

View File

@@ -0,0 +1,21 @@
variable "compartment_id" {
description = "Compartment OCID"
type = string
}
variable "instance_name" {
description = "计算实例名称"
type = string
default = "my-instance"
}
variable "shape" {
description = "实例规格"
type = string
default = "VM.Standard2.1"
}
variable "subnet_id" {
description = "子网 OCID"
type = string
}