Initial commit: Terraform configurations for multiple cloud providers
This commit is contained in:
13
modules/network/main.tf
Normal file
13
modules/network/main.tf
Normal file
@@ -0,0 +1,13 @@
|
||||
# 通用网络模块示例
|
||||
# 这是一个跨云网络模块的示例结构
|
||||
# 实际实现需要根据具体的云平台进行调整
|
||||
|
||||
resource "null_resource" "network_example" {
|
||||
triggers = {
|
||||
name = var.network_name
|
||||
}
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "echo '创建网络: ${var.network_name}'"
|
||||
}
|
||||
}
|
||||
9
modules/network/outputs.tf
Normal file
9
modules/network/outputs.tf
Normal file
@@ -0,0 +1,9 @@
|
||||
output "network_name" {
|
||||
description = "网络名称"
|
||||
value = var.network_name
|
||||
}
|
||||
|
||||
output "cidr_block" {
|
||||
description = "CIDR 地址块"
|
||||
value = var.cidr_block
|
||||
}
|
||||
17
modules/network/variables.tf
Normal file
17
modules/network/variables.tf
Normal file
@@ -0,0 +1,17 @@
|
||||
variable "network_name" {
|
||||
description = "网络名称"
|
||||
type = string
|
||||
default = "my-network"
|
||||
}
|
||||
|
||||
variable "cidr_block" {
|
||||
description = "CIDR 地址块"
|
||||
type = string
|
||||
default = "10.0.0.0/16"
|
||||
}
|
||||
|
||||
variable "tags" {
|
||||
description = "资源标签"
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
Reference in New Issue
Block a user