39 lines
802 B
HCL
39 lines
802 B
HCL
# 全局输出定义
|
|
|
|
# 环境信息
|
|
output "environment" {
|
|
description = "当前部署环境"
|
|
value = var.environment
|
|
}
|
|
|
|
output "project_name" {
|
|
description = "项目名称"
|
|
value = var.project_name
|
|
}
|
|
|
|
# 网络信息
|
|
output "vpc_cidr" {
|
|
description = "VPC CIDR 块"
|
|
value = var.vpc_cidr
|
|
}
|
|
|
|
# 通用标签
|
|
output "common_tags" {
|
|
description = "通用资源标签"
|
|
value = merge(var.common_tags, {
|
|
Environment = var.environment
|
|
Timestamp = timestamp()
|
|
})
|
|
}
|
|
|
|
# 云服务商配置状态
|
|
output "enabled_providers" {
|
|
description = "启用的云服务商列表"
|
|
value = var.cloud_providers
|
|
}
|
|
|
|
# 实例类型配置
|
|
output "instance_types" {
|
|
description = "当前环境的实例类型配置"
|
|
value = var.instance_types[var.environment]
|
|
} |