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,13 @@
# Oracle VCN 模块示例
# 这是一个示例,实际使用时需要替换为真实的 OCI 资源
resource "null_resource" "vcn_example" {
triggers = {
compartment_id = var.compartment_id
vcn_name = var.vcn_name
}
provisioner "local-exec" {
command = "echo '创建 VCN: ${var.vcn_name}CIDR: ${var.cidr_block},在 Compartment: ${var.compartment_id}'"
}
}

View File

@@ -0,0 +1,9 @@
output "vcn_name" {
description = "VCN 名称"
value = var.vcn_name
}
output "cidr_block" {
description = "CIDR 地址块"
value = var.cidr_block
}

View File

@@ -0,0 +1,22 @@
variable "compartment_id" {
description = "Compartment OCID where the VCN will be created"
type = string
}
variable "vcn_name" {
description = "Name of the VCN"
type = string
default = "my-vcn"
}
variable "cidr_block" {
description = "CIDR block for the VCN"
type = string
default = "10.0.0.0/16"
}
variable "dns_label" {
description = "DNS label for the VCN"
type = string
default = "vcn"
}